Class: YaGraph::Edge

Inherits:
Element show all
Defined in:
lib/yagraphlib.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Element

#random_id, #uid

Instance Attribute Details

#finishObject (readonly)

Returns the value of attribute finish.



128
129
130
# File 'lib/yagraphlib.rb', line 128

def finish
  @finish
end

#startObject (readonly)

Returns the value of attribute start.



128
129
130
# File 'lib/yagraphlib.rb', line 128

def start
  @start
end

Instance Method Details

#colourObject



133
# File 'lib/yagraphlib.rb', line 133

def colour() "black" end

#labelObject



132
# File 'lib/yagraphlib.rb', line 132

def label() "" end

#to_graphviz(out) ⇒ Object



129
130
131
# File 'lib/yagraphlib.rb', line 129

def to_graphviz(out)
  out.puts("  #{start.id} -> #{finish.id} [ color=\"#{colour}\" label=\"#{label}\"]")
end