Class: Ruby::MultiAssignment
- Inherits:
-
DelimitedList
- Object
- Node
- Aggregate
- List
- DelimitedList
- Ruby::MultiAssignment
- Defined in:
- lib/ruby/assignment.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
Attributes included from Node::Composite
Instance Method Summary collapse
-
#initialize(kind, elements = [], ldelim = nil, rdelim = nil, splat = nil) ⇒ MultiAssignment
constructor
A new instance of MultiAssignment.
- #nodes ⇒ Object
Methods inherited from List
Methods included from Alternation::List
Methods included from Conversions::List
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(kind, elements = [], ldelim = nil, rdelim = nil, splat = nil) ⇒ MultiAssignment
Returns a new instance of MultiAssignment.
22 23 24 25 26 |
# File 'lib/ruby/assignment.rb', line 22 def initialize(kind, elements = [], ldelim = nil, rdelim = nil, splat = nil) self.kind = kind self.splat = splat super(elements, ldelim, rdelim) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ruby::List
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind.
19 20 21 |
# File 'lib/ruby/assignment.rb', line 19 def kind @kind end |
Instance Method Details
#nodes ⇒ Object
28 29 30 |
# File 'lib/ruby/assignment.rb', line 28 def nodes [ldelim, splat, elements, rdelim].flatten.compact end |