| Module | Origin::Extensions::Hash |
| In: |
lib/origin/extensions/hash.rb
|
This module contains additional hash behaviour.
Make a deep copy of this hash.
@example Make a deep copy of the hash.
{ field: value }.__deep_copy__
@return [ Hash ] The copied hash.
@since 1.0.0
Get the object as expanded.
@example Get the object expanded.
obj.__expand_complex__
@return [ Hash ] The expanded hash.
@since 1.0.5
Get the hash as a sort option.
@example Get the hash as a sort option.
{ field: 1 }.__sort_option__
@return [ Hash ] The hash as sort option.
@since 1.0.0
Update all the values in the hash with the provided block.
@example Update the values in place.
{ field: "1" }.update_values(&:to_i)
@param [ Proc ] block The block to execute on each value.
@return [ Hash ] the hash.
@since 1.0.0