class CyclicLink
Represents a cyclic link betwee two nodes, it is special in the sense it is designed to be used as a key in a hash
Attributes
node_a[R]
node_b[R]
Public Class Methods
new(node_a, node_b)
click to toggle source
# File lib/cpp_dependency_graph/cyclic_link.rb, line 10 def initialize(node_a, node_b) @node_a = node_a @node_b = node_b end
Public Instance Methods
eql?(other)
click to toggle source
# File lib/cpp_dependency_graph/cyclic_link.rb, line 15 def eql?(other) (@node_a == other.node_a && @node_b == other.node_b) || (@node_a == other.node_b && @node_b == other.node_a) end
hash()
click to toggle source
# File lib/cpp_dependency_graph/cyclic_link.rb, line 20 def hash [@node_a, @node_b].to_set.hash end
to_s()
click to toggle source
# File lib/cpp_dependency_graph/cyclic_link.rb, line 24 def to_s "#{node_a} <-> #{node_b}" end