Class: CodeGraph::Inheritance

Inherits:
Object
  • Object
show all
Defined in:
lib/codegraph/inheritance.rb

Constant Summary collapse

CLASS_REGEXP =
/class\s+([A-Z][\w:]*)(?:\s*<\s*([A-Z][\w:]*))?/

Instance Method Summary collapse

Constructor Details

#initialize(dir, options = {}) ⇒ Inheritance

Returns a new instance of Inheritance.



10
11
12
13
14
15
16
17
18
19
# File 'lib/codegraph/inheritance.rb', line 10

def initialize(dir, options={})
  @dir = dir
  @options = options

  @nodes = {}
  @edges = {}

  @processor = InheritanceProcessor.new
  @g = GraphViz.new(@options[:graph_name], graphviz_options)
end

Instance Method Details

#generateObject



21
22
23
24
# File 'lib/codegraph/inheritance.rb', line 21

def generate
  directory_scan
  output
end