Method: PageTemplate::IfCommand#output

Defined in:
lib/PageTemplate/commands.rb

#output(namespace = nil) ⇒ Object

If @value is true within the context of namespace, then print the output of @trueCommands. Otherwise, print the output of



351
352
353
354
355
356
357
# File 'lib/PageTemplate/commands.rb', line 351

def output(namespace=nil)
  val = ''
  @trueCommands.each do |val,commands|
    return commands.output(namespace) if namespace.true?(val)
  end
  @falseCommands.output(namespace)
end