Class: Ruby::Assoc
Instance Attribute Summary
Attributes included from Node::Composite
Instance Method Summary collapse
-
#initialize(key, value, operator) ⇒ Assoc
constructor
A new instance of Assoc.
- #nodes ⇒ Object
Methods inherited from Aggregate
#position, #position=, #prolog, #prolog=, #to_ruby
Methods inherited from Node
#<=>, #all_nodes, #column, #length, #row
Methods included from Conversions
Methods included from Node::Traversal
#has_token?, #has_type?, #has_value?, #is_instance_of?, #left_of?, #matches?, #position?, #right_of?, #select
Methods included from Node::Source
#context, #filename, #line, #lines, #src
Methods included from Node::Composite
Constructor Details
#initialize(key, value, operator) ⇒ Assoc
Returns a new instance of Assoc.
7 8 9 10 11 |
# File 'lib/ruby/assoc.rb', line 7 def initialize(key, value, operator) self.key = key self.value = value self.operator = operator end |
Instance Method Details
#nodes ⇒ Object
13 14 15 |
# File 'lib/ruby/assoc.rb', line 13 def nodes [key, operator, value].compact end |