Class: Lookout::Expected::Hash
- Defined in:
- lib/lookout-3.0/expected/hash.rb
Overview
Represents expected Hashes.
Instance Method Summary collapse
-
#difference(actual) ⇒ Difference::Hash?
A difference report between ACTUAL and #expected unless their content exhibit no differences.
Methods inherited from Object
Instance Method Details
#difference(actual) ⇒ Difference::Hash?
Returns A difference report between ACTUAL and #expected unless their content exhibit no differences.
8 9 10 11 12 13 |
# File 'lib/lookout-3.0/expected/hash.rb', line 8 def difference(actual) Lookout::Difference::Hash.new(actual, expected) unless Hash === actual and expected.size == actual.size and expected.none?{ |k, v| v.to_lookout_expected.difference(actual[k]) } end |