# File lib/puppet/type.rb, line 796
796:     def currentpropvalues
797:         # It's important to use the 'properties' method here, as it follows the order
798:         # in which they're defined in the class.  It also guarantees that 'ensure'
799:         # is the first property, which is important for skipping 'retrieve' on
800:         # all the properties if the resource is absent.
801:         ensure_state = false
802:         return properties().inject({}) do | prophash, property|
803:             if property.name == :ensure
804:                 ensure_state = property.retrieve
805:                 prophash[property] = ensure_state
806:             else
807:                 if ensure_state == :absent
808:                     prophash[property] = :absent
809:                 else
810:                     prophash[property] = property.retrieve
811:                 end
812:             end
813:             prophash
814:         end
815:     end