Class: Put::Debug::Incomparable
- Inherits:
-
Struct
- Object
- Struct
- Put::Debug::Incomparable
- Defined in:
- lib/put/debug.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
Returns the value of attribute left.
-
#left_index ⇒ Object
Returns the value of attribute left_index.
-
#left_value ⇒ Object
Returns the value of attribute left_value.
-
#right ⇒ Object
Returns the value of attribute right.
-
#right_index ⇒ Object
Returns the value of attribute right_index.
-
#right_value ⇒ Object
Returns the value of attribute right_value.
-
#sorting_index ⇒ Object
Returns the value of attribute sorting_index.
Instance Method Summary collapse
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left
4 5 6 |
# File 'lib/put/debug.rb', line 4 def left @left end |
#left_index ⇒ Object
Returns the value of attribute left_index
4 5 6 |
# File 'lib/put/debug.rb', line 4 def left_index @left_index end |
#left_value ⇒ Object
Returns the value of attribute left_value
4 5 6 |
# File 'lib/put/debug.rb', line 4 def left_value @left_value end |
#right ⇒ Object
Returns the value of attribute right
4 5 6 |
# File 'lib/put/debug.rb', line 4 def right @right end |
#right_index ⇒ Object
Returns the value of attribute right_index
4 5 6 |
# File 'lib/put/debug.rb', line 4 def right_index @right_index end |
#right_value ⇒ Object
Returns the value of attribute right_value
4 5 6 |
# File 'lib/put/debug.rb', line 4 def right_value @right_value end |
#sorting_index ⇒ Object
Returns the value of attribute sorting_index
4 5 6 |
# File 'lib/put/debug.rb', line 4 def sorting_index @sorting_index end |
Instance Method Details
#inspect ⇒ Object
8 9 10 11 12 13 |
# File 'lib/put/debug.rb', line 8 def inspect both_puts_things = left.is_a?(PutsThing) && right.is_a?(PutsThing) left_desc = (both_puts_things ? left_value : left).inspect right_desc = (both_puts_things ? right_value : right).inspect "Sorting comparator at index #{sorting_index} failed, because items at indices #{left_index} and #{right_index} were not comparable. Their values were `#{left_desc}' and `#{right_desc}', respectively." end |