Class: Ruby::Arg
- Inherits:
-
DelimitedAggregate
- Object
- Node
- Aggregate
- DelimitedAggregate
- Ruby::Arg
- Defined in:
- lib/ruby/args.rb
Instance Attribute Summary
Attributes included from Node::Composite
Instance Method Summary collapse
-
#initialize(arg, ldelim = nil) ⇒ Arg
constructor
A new instance of Arg.
- #method_missing(method, *args, &block) ⇒ Object
- #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(arg, ldelim = nil) ⇒ Arg
Returns a new instance of Arg.
23 24 25 26 |
# File 'lib/ruby/args.rb', line 23 def initialize(arg, ldelim = nil) self.arg = arg super(ldelim) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
32 33 34 |
# File 'lib/ruby/args.rb', line 32 def method_missing(method, *args, &block) arg.respond_to?(method) ? arg.send(method, *args, &block) : super end |
Instance Method Details
#nodes ⇒ Object
28 29 30 |
# File 'lib/ruby/args.rb', line 28 def nodes [ldelim, arg].compact end |