Class: Construqt::Cables::Cable

Inherits:
Object
  • Object
show all
Defined in:
lib/construqt/cables.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(left, right) ⇒ Cable

Returns a new instance of Cable.



17
18
19
20
# File 'lib/construqt/cables.rb', line 17

def initialize(left, right)
  @left = left
  @right = right
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



16
17
18
# File 'lib/construqt/cables.rb', line 16

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



16
17
18
# File 'lib/construqt/cables.rb', line 16

def right
  @right
end

Instance Method Details

#keyObject



22
23
24
# File 'lib/construqt/cables.rb', line 22

def key
  [left.name, right.name].sort.join("<=>")
end