Class: StringNode
- Inherits:
-
PrimitiveNode
- Object
- PrimitiveNode
- StringNode
- Defined in:
- lib/nodes.rb
Overview
Class for primitive data-type String.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #evaluate(scope) ⇒ Object
-
#initialize(value) ⇒ StringNode
constructor
A new instance of StringNode.
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
#value ⇒ Object (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 |