Class: GetConstantNode

Inherits:
Struct
  • Object
show all
Defined in:
lib/turmali/nodes.rb,
lib/turmali/interpreter.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



34
35
36
# File 'lib/turmali/nodes.rb', line 34

def name
  @name
end

Instance Method Details

#eval(context) ⇒ Object



59
60
61
# File 'lib/turmali/interpreter.rb', line 59

def eval(context)
  Constants[name]
end