Module: HashDiff
- Defined in:
- lib/hash_diff.rb,
lib/hash_diff/version.rb,
lib/hash_diff/comparison.rb
Defined Under Namespace
Classes: Comparison
Constant Summary collapse
- VERSION =
"0.8.0"
Class Method Summary collapse
Class Method Details
.diff(*args) ⇒ Object
15 16 17 |
# File 'lib/hash_diff.rb', line 15 def diff(*args) Comparison.new(*args).diff end |
.left_diff(*args) ⇒ Object
19 20 21 |
# File 'lib/hash_diff.rb', line 19 def left_diff(*args) Comparison.new(*args).left_diff end |
.patch! ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/hash_diff.rb', line 5 def self.patch! Hash.class_eval do def diff(right) HashDiff.left_diff(self, right) end end unless Hash.new.respond_to?(:diff) end |
.right_diff(*args) ⇒ Object
23 24 25 |
# File 'lib/hash_diff.rb', line 23 def right_diff(*args) Comparison.new(*args).right_diff end |