Class: HashesEqual::HashAlmostDiffDisplayer
- Inherits:
-
HashDiffDisplayer
- Object
- GenericDiffDisplayer
- HashDiffDisplayer
- HashesEqual::HashAlmostDiffDisplayer
- Defined in:
- lib/hashes_equal/hash_almost_diff_displayer.rb
Defined Under Namespace
Classes: ToleranceMustBeNonNegativeNumeric
Instance Method Summary collapse
-
#initialize(expected:, actual:, tolerance:, strict: false) ⇒ HashAlmostDiffDisplayer
constructor
A new instance of HashAlmostDiffDisplayer.
Methods inherited from GenericDiffDisplayer
Constructor Details
#initialize(expected:, actual:, tolerance:, strict: false) ⇒ HashAlmostDiffDisplayer
Returns a new instance of HashAlmostDiffDisplayer.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/hashes_equal/hash_almost_diff_displayer.rb', line 9 def initialize(expected:, actual:, tolerance:, strict: false) @tolerance = tolerance @strict = strict super( expected: expected, actual: actual, diff_options: { numeric_tolerance: tolerance, strict: strict } ) end |