Class: Janeway::Interpreters::TreeConstructor::Literal

Inherits:
Struct
  • Object
show all
Defined in:
lib/janeway/interpreters/tree_constructor.rb

Overview

Fake interpreter which just returns the given value

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



13
14
15
# File 'lib/janeway/interpreters/tree_constructor.rb', line 13

def value
  @value
end

Instance Method Details

#interpretObject Also known as: node



14
15
16
# File 'lib/janeway/interpreters/tree_constructor.rb', line 14

def interpret(*)
  value
end