def initialize_copy(original)
      instance_variables.each do |ivar|
        instance_variable_set(ivar, DataMapper::Ext.try_dup(instance_variable_get(ivar)))
      end

      self.persistence_state = persistence_state.class.new(self)
    end
def initialize_copy(original)
      instance_variables.each do |ivar|
        instance_variable_set(ivar, DataMapper::Ext.try_dup(instance_variable_get(ivar)))
      end

      self.persistence_state = persistence_state.class.new(self)
    end
Initialize a new instance of this Resource using the provided values

 @param [Hash] attributes
   attribute values to use for the new instance

 @return [Hash]
   attribute values used in the new instance

 @api public
 @api private