class Puppet::Pops::HashMergeStrategy

Produces a new hash by merging hash e1 with hash e2 in such a way that the values of duplicate keys will be those of e1

Constants

INSTANCE

Public Class Methods

key() click to toggle source
    # File lib/puppet/pops/merge_strategy.rb
251 def self.key
252   :hash
253 end

Public Instance Methods

checked_merge(e1, e2) click to toggle source

@param e1 [Hash<String,Object>] The hash that will act as the source of the merge @param e2 [Hash<String,Object>] The hash that will act as the receiver for the merge @return [Hash<String,Object]] The merged hash @see Hash#merge

    # File lib/puppet/pops/merge_strategy.rb
259 def checked_merge(e1, e2)
260   e2.merge(e1)
261 end

Protected Instance Methods

value_t() click to toggle source
    # File lib/puppet/pops/merge_strategy.rb
265 def value_t
266   @value_t ||= Types::TypeParser.singleton.parse('Hash[String,Data]')
267 end