Class: Ruby::Module

Inherits:
DelimitedAggregate show all
Defined in:
lib/ruby/const.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(const, body, ldelim, rdelim) ⇒ Module

Returns a new instance of Module.



24
25
26
27
28
# File 'lib/ruby/const.rb', line 24

def initialize(const, body, ldelim, rdelim)
  self.const = const
  self.body = body
  super(ldelim, rdelim)
end

Instance Method Details

#nodesObject



30
31
32
# File 'lib/ruby/const.rb', line 30

def nodes
  [ldelim, const, body, rdelim].compact
end