Class: Ruby::Param

Inherits:
DelimitedAggregate show all
Defined in:
lib/ruby/params.rb

Instance Attribute Summary

Attributes included from Node::Composite

#parent

Instance Method Summary collapse

Methods inherited from Aggregate

#position, #position=, #prolog, #prolog=, #to_ruby

Methods inherited from Node

#<=>, #all_nodes, #column, #length, #row

Methods included from Conversions

included, #to_node

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

included, #root, #root?

Constructor Details

#initialize(param, ldelim = nil) ⇒ Param

Returns a new instance of Param.



20
21
22
23
# File 'lib/ruby/params.rb', line 20

def initialize(param, ldelim = nil)
  self.param = param
  super(ldelim)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



29
30
31
# File 'lib/ruby/params.rb', line 29

def method_missing(method, *args, &block)
  param.respond_to?(method) ? param.send(method, *args, &block) : super
end

Instance Method Details

#nodesObject



25
26
27
# File 'lib/ruby/params.rb', line 25

def nodes
  [ldelim, param].compact
end