Class: Usher::Util::Graph
- Inherits:
-
Object
- Object
- Usher::Util::Graph
- Defined in:
- lib/usher/util/graph.rb
Instance Attribute Summary collapse
-
#router ⇒ Object
readonly
Returns the value of attribute router.
Instance Method Summary collapse
- #draw(output) ⇒ Object
-
#initialize(router) ⇒ Graph
constructor
A new instance of Graph.
Constructor Details
#initialize(router) ⇒ Graph
Returns a new instance of Graph.
7 8 9 |
# File 'lib/usher/util/graph.rb', line 7 def initialize(router) @router = router end |
Instance Attribute Details
#router ⇒ Object (readonly)
Returns the value of attribute router.
5 6 7 |
# File 'lib/usher/util/graph.rb', line 5 def router @router end |
Instance Method Details
#draw(output) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/usher/util/graph.rb', line 11 def draw(output) File.open(output, 'w') do |f| f.puts "digraph {" f.puts %|node[label="node"]| f.puts "}" end end |