Module: Darthjee::CoreExt::Hash::Changeable
- Included in:
- Darthjee::CoreExt::Hash
- Defined in:
- lib/darthjee/core_ext/hash/changeable.rb
Overview
Methods responsible for changing hash values
Instance Method Summary collapse
-
#change_values {|value| ... } ⇒ ::Hash
Creates a new hash with changes in its values.
-
#change_values! {|value| ... } ⇒ ::Hash
Changes the values of a hash.
Instance Method Details
#change_values {|value| ... } ⇒ ::Hash
Creates a new hash with changes in its values
47 48 49 |
# File 'lib/darthjee/core_ext/hash/changeable.rb', line 47 def change_values(**, &) deep_dup.change_values!(**, &) end |
#change_values! {|value| ... } ⇒ ::Hash
Changes the values of a hash
82 83 84 |
# File 'lib/darthjee/core_ext/hash/changeable.rb', line 82 def change_values!(**, &) Hash::ValueChanger.new(**, &).change(self) end |