Sha256: 4752ec86d9051fe5fa6926cc8dff0cda2d43e96462c09bdee86ae0dc344cbbc7
Contents?: true
Size: 943 Bytes
Versions: 12
Compression:
Stored size: 943 Bytes
Contents
require 'deep_merge/core' module DeepMerge module RailsCompat # ko_hash_merge! will merge and knockout elements prefixed with DEFAULT_FIELD_KNOCKOUT_PREFIX def ko_deeper_merge!(source, options = {}) default_opts = {:knockout_prefix => "--", :preserve_unmergeables => false} DeepMerge::deep_merge!(source, self, default_opts.merge(options)) end # deep_merge! will merge and overwrite any unmergeables in destination hash def deeper_merge!(source, options = {}) default_opts = {:preserve_unmergeables => false} DeepMerge::deep_merge!(source, self, default_opts.merge(options)) end # deep_merge will merge and skip any unmergeables in destination hash def deeper_merge(source, options = {}) default_opts = {:preserve_unmergeables => true} DeepMerge::deep_merge!(source, self, default_opts.merge(options)) end end end class Hash include ::DeepMerge::RailsCompat end
Version data entries
12 entries across 12 versions & 1 rubygems