Module: Gritty::AutoNode

Included in:
Graph
Defined in:
lib/gritty.rb

Instance Method Summary collapse

Instance Method Details

#autonode(label) ⇒ Object



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

def autonode label
  @node_num = (@node_num || 0) + 1
  name = "node#{@node_num}"
  node name, label
  name
end