Class: Ruby::Method

Inherits:
NamedAggregate show all
Defined in:
lib/ruby/method.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(target, separator, identifier, params, block, ldelim, rdelim) ⇒ Method

Returns a new instance of Method.



7
8
9
10
11
12
13
# File 'lib/ruby/method.rb', line 7

def initialize(target, separator, identifier, params, block, ldelim, rdelim)
  self.target = target
  self.separator = separator
  self.params = params
  self.block = block
  super(identifier, ldelim, rdelim)
end

Instance Method Details

#nodesObject



15
16
17
# File 'lib/ruby/method.rb', line 15

def nodes
  [ldelim, target, separator, identifier, params, block, rdelim].compact
end