def inspect
      # TODO: display relationship values
      attrs = properties.map do |property|
        value = if new? || property.loaded?(self)
          property.get!(self).inspect
        else
          '<not loaded>'
        end

        "#{property.instance_variable_name}=#{value}"
      end

      "#<#{model.name} #{attrs.join(' ')}>"
    end
def inspect
      # TODO: display relationship values
      attrs = properties.map do |property|
        value = if new? || property.loaded?(self)
          property.get!(self).inspect
        else
          '<not loaded>'
        end

        "#{property.instance_variable_name}=#{value}"
      end

      "#<#{model.name} #{attrs.join(' ')}>"
    end
Compares another Resource for equality

 Resource is equal to +other+ if they are the same object
 (identical object_id) or if they are both of the *same model* and
 all of their attributes are equivalent

 @param [Resource] other
   the other Resource to compare with

 @return [Boolean]
   true if they are equal, false if not

 @api public
 Compares another Resource for equivalency

 Resource is equivalent to +other+ if they are the same object
 (identical object_id) or all of their attribute are equivalent

 @param [Resource] other
   the other Resource to compare with

 @return [Boolean]
   true if they are equivalent, false if not

 @api public
 Compares two Resources to allow them to be sorted

 @param [Resource] other
   The other Resource to compare with

 @return [Integer]
   Return 0 if Resources should be sorted as the same, -1 if the
   other Resource should be after self, and 1 if the other Resource
   should be before self

 @api public
 Returns hash value of the object.
 Two objects with the same hash value assumed equal (using eql? method)

 DataMapper resources are equal when their models have the same hash
 and they have the same set of properties

 When used as key in a Hash or Hash subclass, objects are compared
 by eql? and thus hash value has direct effect on lookup

 @api private
 Get a Human-readable representation of this Resource instance

   Foo.new   #=> #<Foo name=nil updated_at=nil created_at=nil id=nil>

 @return [String]
   Human-readable representation of this Resource instance

 @api public