Method: PageTemplate::IfCommand#add

Defined in:
lib/PageTemplate/commands.rb

#add(command) ⇒ Object

Add the command to the @trueCommands or @falseCommands block, depending on if the command is an ‘if’ or ‘unless’ and if ‘else’ has been called.



329
330
331
332
333
334
335
# File 'lib/PageTemplate/commands.rb', line 329

def add(command)
  unless @in_else
    @trueCommands.last.last.add command
  else
    @falseCommands.add command
  end
end