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
252 def self.key
253   :hash
254 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
260 def checked_merge(e1, e2)
261   e2.merge(e1)
262 end

Protected Instance Methods

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