Module: RunKit::CoreExt::Hash
- Defined in:
- lib/run_kit/core_ext.rb
Instance Method Summary collapse
Instance Method Details
#hash_sort_by ⇒ Object
62 |
# File 'lib/run_kit/core_ext.rb', line 62 def hash_sort_by(&) = sort_by(&).to_h |
#sort_by_key ⇒ Object
63 |
# File 'lib/run_kit/core_ext.rb', line 63 def sort_by_key = hash_sort_by { _1 } |
#sort_by_value ⇒ Object
64 |
# File 'lib/run_kit/core_ext.rb', line 64 def sort_by_value = hash_sort_by { _2 } |
#to_struct ⇒ Object
65 |
# File 'lib/run_kit/core_ext.rb', line 65 def to_struct = Struct.new(*keys.map(&:to_sym)).new(*values) |