Class: Ruby::Class

Inherits:
NamedAggregate 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, operator, super_class, body, ldelim, rdelim) ⇒ Class

Returns a new instance of Class.



38
39
40
41
42
43
# File 'lib/ruby/const.rb', line 38

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

Instance Method Details

#nodesObject



45
46
47
# File 'lib/ruby/const.rb', line 45

def nodes
  [ldelim, identifier, operator, super_class, body, rdelim].compact
end