Class: PageTemplate::DefineCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/PageTemplate/commands.rb

Overview

DefineCommand will set a variable within the enclosing namespace

Instance Attribute Summary

Attributes inherited from Command

#called_as

Instance Method Summary collapse

Methods inherited from Command

#to_s

Constructor Details

#initialize(name, value) ⇒ DefineCommand

Returns a new instance of DefineCommand.



214
215
216
217
# File 'lib/PageTemplate/commands.rb', line 214

def initialize(name, value)
  @name = name
  @value = value
end

Instance Method Details

#output(namespace) ⇒ Object

Doesn’t return any output



220
221
222
223
# File 'lib/PageTemplate/commands.rb', line 220

def output(namespace)
  namespace[@name] = @value
  return
end