Class: Halunke::StringNode
- Inherits:
-
Struct
- Object
- Struct
- Halunke::StringNode
- Defined in:
- lib/halunke/nodes.rb
Instance Attribute Summary collapse
-
#te ⇒ Object
Returns the value of attribute te.
-
#ts ⇒ Object
Returns the value of attribute ts.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#te ⇒ Object
Returns the value of attribute te
28 29 30 |
# File 'lib/halunke/nodes.rb', line 28 def te @te end |
#ts ⇒ Object
Returns the value of attribute ts
28 29 30 |
# File 'lib/halunke/nodes.rb', line 28 def ts @ts end |
#value ⇒ Object
Returns the value of attribute value
28 29 30 |
# File 'lib/halunke/nodes.rb', line 28 def value @value end |
Instance Method Details
#==(other) ⇒ Object
34 35 36 37 |
# File 'lib/halunke/nodes.rb', line 34 def ==(other) other.is_a?(StringNode) && value == other.value end |
#eval(context) ⇒ Object
29 30 31 32 |
# File 'lib/halunke/nodes.rb', line 29 def eval(context) context["String"].create_instance(value, source_code_position: source_code_position) end |
#source_code_position ⇒ Object
39 40 41 |
# File 'lib/halunke/nodes.rb', line 39 def source_code_position SourceCodePosition.new(ts, te) end |