Class: SuperDiff::RSpec::OperationalSequencers::PartialHash
- Inherits:
-
OperationalSequencers::Hash
- Object
- OperationalSequencers::Base
- OperationalSequencers::Hash
- SuperDiff::RSpec::OperationalSequencers::PartialHash
- Defined in:
- lib/super_diff/rspec/operational_sequencers/partial_hash.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(expected:, **rest) ⇒ PartialHash
constructor
A new instance of PartialHash.
Methods inherited from OperationalSequencers::Base
Constructor Details
#initialize(expected:, **rest) ⇒ PartialHash
Returns a new instance of PartialHash.
9 10 11 12 13 |
# File 'lib/super_diff/rspec/operational_sequencers/partial_hash.rb', line 9 def initialize(expected:, **rest) super @expected = expected.expecteds.first end |
Class Method Details
.applies_to?(expected, actual) ⇒ Boolean
5 6 7 |
# File 'lib/super_diff/rspec/operational_sequencers/partial_hash.rb', line 5 def self.applies_to?(expected, actual) SuperDiff::RSpec.partial_hash?(expected) && actual.is_a?(::Hash) end |