Method: Puppet::Type#to_hash

Defined in:
lib/puppet/type.rb

#to_hashHash{ ??? => ??? }

TODO:

the comment says: “Convert our object to a hash. This just includes properties.”

TODO:

this is confused, again it is the @parameters instance variable that is consulted, and each value is copied - does it contain “properties” and “parameters” or both? Does it contain meta-parameters?

Returns a hash of WHAT?. The hash is a shallow copy, any changes to the objects returned in this hash will be reflected in the original resource having these attributes.

Returns:

  • (Hash{ ??? => ??? })

    a hash of WHAT?. The hash is a shallow copy, any changes to the objects returned in this hash will be reflected in the original resource having these attributes.



877
878
879
880
881
882
883
884
885
# File 'lib/puppet/type.rb', line 877

def to_hash
  rethash = {}

  @parameters.each do |name, obj|
    rethash[name] = obj.value
  end

  rethash
end