Inversion::Template::
IfTag class
Superclass | Inversion::Template::AttrTag |
Included Modules |
Inversion
‘if’ tag.
This tag causes a section of the template to be rendered only if its methodchain or attribute is a true value.
Syntax
<?if attr ?>...<?end?> <?if obj.method ?>...<?end?>
Attributes
- inverted RW
Invert the tag’s renderstate if created with the ‘not’ operator.
Public Class Methods
Create a new IfTag
.
Public Instance Methods
Render the tag’s contents if the condition is true, or any else or elsif sections if the condition isn’t true.