Class: Lookout::Difference::Hash
- Defined in:
- lib/lookout-3.0/difference/hash.rb
Overview
Instance Attribute Summary
Attributes inherited from Object
Instance Method Summary collapse
-
#diff ⇒ Lookout::Diff::Formats::Set, super
A set “diff” unless Object#expected contains one element or Object#actual isn’t a Hash, super otherwise.
Methods inherited from Object
#==, #hash, #initialize, #message, #to_s
Constructor Details
This class inherits a constructor from Lookout::Difference::Object
Instance Method Details
#diff ⇒ Lookout::Diff::Formats::Set, super
Returns A set “diff” unless Object#expected contains one element or Object#actual isn’t a Hash, super otherwise.
10 11 12 13 14 15 16 |
# File 'lib/lookout-3.0/difference/hash.rb', line 10 def diff return super if expected.size == 1 or not Hash === actual Lookout::Diff::Formats::Set. new(Lookout::Diff::Operations. new(Lookout::Diff::Algorithms::Difflib. new(array(actual), array(expected)))) end |