# File lib/puppet/type.rb, line 711
711:   def currentpropvalues
712:     # It's important to use the 'properties' method here, as it follows the order
713:     # in which they're defined in the class.  It also guarantees that 'ensure'
714:     # is the first property, which is important for skipping 'retrieve' on
715:     # all the properties if the resource is absent.
716:     ensure_state = false
717:     return properties.inject({}) do | prophash, property|
718:       if property.name == :ensure
719:         ensure_state = property.retrieve
720:         prophash[property] = ensure_state
721:       else
722:         if ensure_state == :absent
723:           prophash[property] = :absent
724:         else
725:           prophash[property] = property.retrieve
726:         end
727:       end
728:       prophash
729:     end
730:   end