| Class | PageTemplate::LoopCommand |
| In: |
lib/PageTemplate/commands.rb
|
| Parent: | StackableCommand |
LoopCommand is a StackableCommand. It requires an opening:
variable is fetched from the namespace.
On execution, if variable is true, and non-empty, then @commands is printed once with each item in the list placed in its own namespace and passed to the loop commands. (a list is defined as an object that responds to :map)
If variable is true, but does not respond to :map, then the list is called once
@elseCommands in case variable is false, or empty.