Class: PrimitiveNode

Inherits:
Object
  • Object
show all
Defined in:
lib/nodes.rb

Direct Known Subclasses

BoolNode, CharNode, DigitNode, IdentifierNode

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ PrimitiveNode

Returns a new instance of PrimitiveNode.



280
281
282
# File 'lib/nodes.rb', line 280

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



279
280
281
# File 'lib/nodes.rb', line 279

def value
  @value
end

Instance Method Details

#evaluate(scope) ⇒ Object



284
285
286
# File 'lib/nodes.rb', line 284

def evaluate(scope)
  return @value
end