Class: Sablon::Expression::Variable

Inherits:
Struct
  • Object
show all
Defined in:
lib/sablon/operations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



157
158
159
# File 'lib/sablon/operations.rb', line 157

def name
  @name
end

Instance Method Details

#evaluate(context) ⇒ Object



158
159
160
# File 'lib/sablon/operations.rb', line 158

def evaluate(context)
  context[name]
end

#inspectObject



162
163
164
# File 'lib/sablon/operations.rb', line 162

def inspect
  "«#{name}»"
end