Top Level Namespace
Defined Under Namespace
Modules: Chain
Instance Method Summary collapse
Instance Method Details
#ensure_key_sorting(h) ⇒ Object
1 2 3 4 5 |
# File 'lib/chain/batch_response.rb', line 1 def ensure_key_sorting(h) sorted = h.keys.sort return h if sorted == h.keys sorted.reduce({}) { |memo, k| memo[k] = h[k]; memo } end |