Class: Transitions::Graph

Inherits:
GraphViz
  • Object
show all
Defined in:
lib/transitions/graph.rb

Instance Method Summary collapse

Constructor Details

#initialize(class_name, options = {}) ⇒ Graph

Returns a new instance of Graph.



5
6
7
8
9
10
# File 'lib/transitions/graph.rb', line 5

def initialize(class_name, options = {})
  options = {path: '.'}.merge(options)

  @file_path = File.join(options[:path], "#{class_name.parameterize('_')}_transitions.png")
  super(:G)
end

Instance Method Details

#outputObject



12
13
14
# File 'lib/transitions/graph.rb', line 12

def output
  super png: @file_path
end