Class: Moory::Pair
- Inherits:
-
Struct
- Object
- Struct
- Moory::Pair
- Defined in:
- lib/moory/pair.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
Returns the value of attribute left.
-
#right ⇒ Object
Returns the value of attribute right.
Instance Method Summary collapse
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left
2 3 4 |
# File 'lib/moory/pair.rb', line 2 def left @left end |
#right ⇒ Object
Returns the value of attribute right
2 3 4 |
# File 'lib/moory/pair.rb', line 2 def right @right end |
Instance Method Details
#shunt(value) ⇒ Object
7 8 9 |
# File 'lib/moory/pair.rb', line 7 def shunt(value) { left => { right => value } } end |
#valid? ⇒ Boolean
3 4 5 |
# File 'lib/moory/pair.rb', line 3 def valid? left && right end |