Class: Halunke::ArrayNode
- Inherits:
-
Struct
- Object
- Struct
- Halunke::ArrayNode
- Defined in:
- lib/halunke/nodes.rb
Instance Attribute Summary collapse
-
#nodes ⇒ Object
Returns the value of attribute nodes.
-
#te ⇒ Object
Returns the value of attribute te.
-
#ts ⇒ Object
Returns the value of attribute ts.
Instance Method Summary collapse
Instance Attribute Details
#nodes ⇒ Object
Returns the value of attribute nodes
97 98 99 |
# File 'lib/halunke/nodes.rb', line 97 def nodes @nodes end |
#te ⇒ Object
Returns the value of attribute te
97 98 99 |
# File 'lib/halunke/nodes.rb', line 97 def te @te end |
#ts ⇒ Object
Returns the value of attribute ts
97 98 99 |
# File 'lib/halunke/nodes.rb', line 97 def ts @ts end |
Instance Method Details
#==(other) ⇒ Object
102 103 104 105 |
# File 'lib/halunke/nodes.rb', line 102 def ==(other) other.is_a?(ArrayNode) && nodes == other.nodes end |
#eval(context) ⇒ Object
98 99 100 |
# File 'lib/halunke/nodes.rb', line 98 def eval(context) context["Array"].create_instance(nodes.map { |node| node.eval(context) }) end |
#source_code_position ⇒ Object
107 108 109 |
# File 'lib/halunke/nodes.rb', line 107 def source_code_position SourceCodePosition.new(ts, te) end |