def attributes
      self.class.properties.inject(ActiveSupport::HashWithIndifferentAccess.new) do |res, property|
        property.value(res, self)
        res
      end
    end
def attributes
      self.class.properties.inject(ActiveSupport::HashWithIndifferentAccess.new) do |res, property|
        property.value(res, self)
        res
      end
    end
returns all of a model's attributes that have been defined using the #property method as a Hash

 example:
   class Book
     include CouchPotato::Persistence
     property :title
     property :year
   end
   book = Book.new :year => 2009
   book.attributes # => {'title' => nil, 'year' => 2009}