Class: Kitchen::Driver::Dokken::PartialHash
- Inherits:
-
Hash
- Object
- Hash
- Kitchen::Driver::Dokken::PartialHash
- Defined in:
- lib/kitchen/driver/dokken.rb
Overview
A Hash that compares equal to any Hash containing all of its pairs.
The daemon echoes back more volumes than we asked for, so a plain equality check against the requested set would never match.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Whether
othercontains every pair this hash holds.
Instance Method Details
#==(other) ⇒ Boolean
Whether other contains every pair this hash holds.
235 236 237 |
# File 'lib/kitchen/driver/dokken.rb', line 235 def ==(other) other.is_a?(Hash) && all? { |key, val| other.key?(key) && other[key] == val } end |