Class: Separatum::GraphViz::Proxy
- Inherits:
-
Object
- Object
- Separatum::GraphViz::Proxy
- Defined in:
- lib/separatum/graph_viz/proxy.rb
Instance Attribute Summary collapse
-
#gv ⇒ Object
readonly
Returns the value of attribute gv.
Instance Method Summary collapse
- #add_edge(node1, node2) ⇒ Object
- #add_node(name, *options) ⇒ Object
-
#initialize(gv) ⇒ Proxy
constructor
A new instance of Proxy.
-
#output(*params) ⇒ Object
FIXME: change to delegate/forwardable.
Constructor Details
#initialize(gv) ⇒ Proxy
Returns a new instance of Proxy.
6 7 8 9 10 |
# File 'lib/separatum/graph_viz/proxy.rb', line 6 def initialize(gv) @gv = gv @gv[:overlap] = :false @nodes = {} end |
Instance Attribute Details
#gv ⇒ Object (readonly)
Returns the value of attribute gv.
4 5 6 |
# File 'lib/separatum/graph_viz/proxy.rb', line 4 def gv @gv end |
Instance Method Details
#add_edge(node1, node2) ⇒ Object
20 21 22 |
# File 'lib/separatum/graph_viz/proxy.rb', line 20 def add_edge(node1, node2) @gv.add_edges(node1, node2) end |
#add_node(name, *options) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/separatum/graph_viz/proxy.rb', line 12 def add_node(name, *) if @nodes.key?(name) @nodes[name] else @nodes[name] = @gv.add_node(name, *) end end |
#output(*params) ⇒ Object
FIXME: change to delegate/forwardable
25 26 27 |
# File 'lib/separatum/graph_viz/proxy.rb', line 25 def output(*params) @gv.output(*params) end |