Class: NumberNode

Inherits:
LiteralNode show all
Defined in:
lib/nodes.rb,
lib/interpreter.rb

Instance Attribute Summary

Attributes inherited from LiteralNode

#value

Instance Method Summary collapse

Instance Method Details

#eval(context) ⇒ Object



30
31
32
33
34
# File 'lib/interpreter.rb', line 30

def eval(context)
  # Here we access the Runtime, which we'll see in the next section, to create a new
  # instance of the Number class.
  Runtime["Number"].new_with_value(value)
end