module JSONRB::Helpers
Public Instance Methods
merge(*hashes)
click to toggle source
Merges multiple hashes together.
@example
one = { one: 1 } two = { two: 2 } three = { three: 3 } merge(one, two, three) # => { one: 1, two: 2, three: 3 }
@param [*Hash] hashes All of the hashes to merge. @return [Hash] Merged hashes.
# File lib/jsonrb/helpers.rb, line 15 def merge(*hashes) hashes.inject({}, &:merge!) end