Class: Rpr::Formatter::Dot
- Inherits:
-
Object
- Object
- Rpr::Formatter::Dot
- Defined in:
- lib/rpr/formatter/dot.rb
Overview
Formatter for Graphviz
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Dot
constructor
A new instance of Dot.
- #print(object) ⇒ Object
Constructor Details
#initialize ⇒ Dot
Returns a new instance of Dot.
60 61 62 |
# File 'lib/rpr/formatter/dot.rb', line 60 def initialize @id = :a end |
Class Method Details
.print(object) ⇒ Object
56 57 58 |
# File 'lib/rpr/formatter/dot.rb', line 56 def self.print(object) self.new.print(object) end |
Instance Method Details
#print(object) ⇒ Object
64 65 66 67 68 |
# File 'lib/rpr/formatter/dot.rb', line 64 def print(object) puts 'digraph{graph [dpi=288;];' traverse_and_print(object) puts "}" end |