Class: ClimateControl::Modifier::OverlappingKeysWithChangedValues
- Inherits:
-
Object
- Object
- ClimateControl::Modifier::OverlappingKeysWithChangedValues
- Defined in:
- lib/climate_control/modifier.rb
Instance Method Summary collapse
-
#initialize(hash_1, hash_2) ⇒ OverlappingKeysWithChangedValues
constructor
A new instance of OverlappingKeysWithChangedValues.
- #keys ⇒ Object
Constructor Details
#initialize(hash_1, hash_2) ⇒ OverlappingKeysWithChangedValues
Returns a new instance of OverlappingKeysWithChangedValues.
78 79 80 81 |
# File 'lib/climate_control/modifier.rb', line 78 def initialize(hash_1, hash_2) @hash_1 = hash_1 || {} @hash_2 = hash_2 end |
Instance Method Details
#keys ⇒ Object
83 84 85 86 87 |
# File 'lib/climate_control/modifier.rb', line 83 def keys overlapping_keys.select do |overlapping_key| @hash_1[overlapping_key] != @hash_2[overlapping_key] end end |