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



56
57
58
# File 'lib/sablon/operations.rb', line 56

def name
  @name
end

Instance Method Details

#evaluate(context) ⇒ Object



57
58
59
# File 'lib/sablon/operations.rb', line 57

def evaluate(context)
  context[name]
end

#inspectObject



61
62
63
# File 'lib/sablon/operations.rb', line 61

def inspect
  "«#{name}»"
end