class EmailGraph::DirectedEdge

Attributes

from[R]
to[R]

Public Class Methods

new(from, to) click to toggle source
# File lib/email_graph/directed_graph.rb, line 102
def initialize(from, to)
  raise ArgumentError, "Vertices cannot be falsy" unless from && to
  @from = from
  @to = to
end

Public Instance Methods

==(other) click to toggle source
# File lib/email_graph/directed_graph.rb, line 112
def ==(other)
  from == other.from && to == other.to
end
Also aliased as: eql?
eql?(other)
Alias for: ==
hash() click to toggle source
# File lib/email_graph/directed_graph.rb, line 108
def hash
  from.hash ^ to.hash
end
to_s() click to toggle source
# File lib/email_graph/directed_graph.rb, line 117
def to_s
  "(#{from}-#{to})"
end