Class: StringNode

Inherits:
PrimitiveNode show all
Defined in:
lib/nodes.rb

Overview

Class for primitive data-type String.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ StringNode

Returns a new instance of StringNode.



391
392
393
# File 'lib/nodes.rb', line 391

def initialize(value)
  @value = value.gsub(/^"|"$/, '')
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



390
391
392
# File 'lib/nodes.rb', line 390

def value
  @value
end

Instance Method Details

#evaluate(scope) ⇒ Object



395
396
397
# File 'lib/nodes.rb', line 395

def evaluate(scope)
  return @value
end