Class: ClimateControl::Modifier::OverlappingKeysWithChangedValues

Inherits:
Object
  • Object
show all
Defined in:
lib/climate_control/modifier.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash_1, hash_2) ⇒ OverlappingKeysWithChangedValues

Returns a new instance of OverlappingKeysWithChangedValues.



66
67
68
69
# File 'lib/climate_control/modifier.rb', line 66

def initialize(hash_1, hash_2)
  @hash_1 = hash_1
  @hash_2 = hash_2
end

Instance Method Details

#keysObject



71
72
73
74
75
# File 'lib/climate_control/modifier.rb', line 71

def keys
  overlapping_keys.select do |overlapping_key|
    @hash_1[overlapping_key] != @hash_2[overlapping_key]
  end
end