Class PageTemplate::StackableCommand
In: lib/PageTemplate/commands.rb
Parent: Command

StackableCommand is the parent class of any command that creates a branch in the logic: such as If, Loop, etcetera.

Any child that wants to do more than stand alone must inherit from StackableCommand. We recommend setting @called_as, so all of StackableCommand‘s ways of closing blocks work.

Methods

add   end   new   to_s  

Public Class methods

@called_as is set to the command which this is called as. This allows a number of [% end %], [% end name %], [% endname %] or even [% /name %] to close StackableCommands.

Public Instance methods

[Validate]