Class: Ruby::DelimitedList
Direct Known Subclasses
ArgsList, Array, Hash, MultiAssignment, Params, Statements, String
Instance Attribute Summary
Attributes included from Node::Composite
Instance Method Summary collapse
-
#initialize(elements = nil, ldelim = nil, rdelim = nil) ⇒ DelimitedList
constructor
A new instance of DelimitedList.
- #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(elements = nil, ldelim = nil, rdelim = nil) ⇒ DelimitedList
Returns a new instance of DelimitedList.
27 28 29 30 31 |
# File 'lib/ruby/list.rb', line 27 def initialize(elements = nil, ldelim = nil, rdelim = nil) self.ldelim = ldelim self.rdelim = rdelim super(elements) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ruby::List
Instance Method Details
#nodes ⇒ Object
33 34 35 |
# File 'lib/ruby/list.rb', line 33 def nodes ([ldelim] + super + [rdelim]).flatten.compact end |