Inversion ‘for’ tag.
Iteration tag for outputting a template part for each member of a collection (i.e., an object that is Enumerable).
<?for var in attribute ?> <?for var in attribute.methodchain ?> <?for var1, var2 in attribute.methodchain ?>
<?for employee in company.employees ?> Hey <?call employee.name ?>! You're fired! <?end ?>
- block_args RW
The array of attribute names that will be assigned to the rendering scope by the block for each iteration
- enumerator RW
The attribute or methodchain that yields the enumerable object
Create a new
ForTag with the specified ‘body`.
Render the tag as the body of a comment, suitable for template debugging.
Iterate over the enumerator in ‘state` and render the tag’s contents for each iteration.