Class: ReFe::ClassNode

Inherits:
ModuleNode show all
Defined in:
lib/refe/inheritancegraph.rb

Instance Attribute Summary

Attributes inherited from ModuleNode

#name

Instance Method Summary collapse

Methods inherited from ModuleNode

#include, #inspect

Constructor Details

#initialize(name, super_node) ⇒ ClassNode

Returns a new instance of ClassNode.



100
101
102
103
# File 'lib/refe/inheritancegraph.rb', line 100

def initialize( name, super_node )
  super name
  @superclass = super_node
end

Instance Method Details

#ancestorsObject



105
106
107
# File 'lib/refe/inheritancegraph.rb', line 105

def ancestors
  (super() + (@superclass ? @superclass.ancestors : [])).uniq
end