class Seafoam::Edge
A directed edge, with a node it's from and a node it's going to, and properties.
Attributes
from[R]
props[R]
to[R]
Public Class Methods
new(from, to, props = nil)
click to toggle source
# File lib/seafoam/graph.rb, line 83 def initialize(from, to, props = nil) props ||= {} @from = from @to = to @props = props end
Public Instance Methods
inspect()
click to toggle source
Inspect.
# File lib/seafoam/graph.rb, line 96 def inspect "<Edge #{from.id} -> #{to.id}>" end
nodes()
click to toggle source
Both nodes - from and to.
# File lib/seafoam/graph.rb, line 91 def nodes [@from, @to] end