Class: HashDiff::Comparison
- Inherits:
-
Struct
- Object
- Struct
- HashDiff::Comparison
- Defined in:
- lib/hash_diff/comparison.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
4 5 6 |
# File 'lib/hash_diff/comparison.rb', line 4 def left @left end |
#right ⇒ Object
Returns the value of attribute right
4 5 6 |
# File 'lib/hash_diff/comparison.rb', line 4 def right @right end |
Instance Method Details
#diff ⇒ Object
6 7 8 9 |
# File 'lib/hash_diff/comparison.rb', line 6 def diff @side ||= :both @diff ||= differences(left, right) end |
#left_diff ⇒ Object
11 12 13 14 |
# File 'lib/hash_diff/comparison.rb', line 11 def left_diff @side = :left @left_diff ||= differences(left, right) end |
#right_diff ⇒ Object
16 17 18 19 |
# File 'lib/hash_diff/comparison.rb', line 16 def right_diff @side = :right @right_diff ||= differences(left, right) end |