Class: PageTemplate::DefineCommand
- Defined in:
- lib/PageTemplate/commands.rb
Overview
DefineCommand will set a variable within the enclosing namespace
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
-
#initialize(name, value) ⇒ DefineCommand
constructor
A new instance of DefineCommand.
-
#output(namespace) ⇒ Object
Doesn’t return any output.
Methods inherited from Command
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 |