Sha256: c5937e2c413ed6be7f1d93feb338aa217cfdf795c0e73e766c9db286a53b3169
Contents?: true
Size: 788 Bytes
Versions: 49
Compression:
Stored size: 788 Bytes
Contents
# dependent on deep_merge and deep_copy module ActiveTools module CoreExtension module MergeHashup module HashExtension # Merge hashup sequence. # # === Example: # # params = {"controller"=>"comments", "action"=>"show", "id"=>34, "article_id"=>3, "page"=>{"article"=>2}} # # params.merge_hashup(:page, :article, 34) # # => {:controller => "comments", :action => "show", :id => 34, :article_id => 3, :page => {:article => 2, :comment => 34}} # def merge_hashup(*args) deep_merge(args.hashup) end def merge_hashup!(*args) deep_merge!(args.hashup) end end ::Hash.send(:include, HashExtension) end end end
Version data entries
49 entries across 49 versions & 1 rubygems