Class: Construqt::Cables::Cable
- Inherits:
-
Object
- Object
- Construqt::Cables::Cable
- Defined in:
- lib/construqt/cables.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Instance Method Summary collapse
-
#initialize(left, right) ⇒ Cable
constructor
A new instance of Cable.
- #key ⇒ Object
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
#left ⇒ Object (readonly)
Returns the value of attribute left.
16 17 18 |
# File 'lib/construqt/cables.rb', line 16 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
16 17 18 |
# File 'lib/construqt/cables.rb', line 16 def right @right end |
Instance Method Details
#key ⇒ Object
22 23 24 |
# File 'lib/construqt/cables.rb', line 22 def key [left.name, right.name].sort.join("<=>") end |