Class: Ruby::Call

Inherits:
Aggregate show all
Defined in:
lib/ruby/call.rb

Direct Known Subclasses

Alias

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, arguments = nil, block = nil) ⇒ Call

Returns a new instance of Call.



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

def initialize(target, separator, identifier, arguments = nil, block = nil)
  self.target = target
  self.separator = separator
  self.identifier = identifier
  self.arguments = arguments
  self.block = block
end

Instance Method Details

#nodesObject



19
20
21
# File 'lib/ruby/call.rb', line 19

def nodes
  [target, separator, identifier, arguments, block].flatten.compact
end

#tokenObject



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

def token
  identifier.token
end