Class: DataMapper::Property::Rating

Inherits:
Integer
  • Object
show all
Defined in:
lib/dm-appengine/properties/rating.rb

Class Method Summary collapse

Class Method Details

.dump(value, property) ⇒ Object



4
5
6
# File 'lib/dm-appengine/properties/rating.rb', line 4

def self.dump(value, property)
  AppEngine::Datastore::Rating.new(typecast(value)) if value
end

.load(value, property) ⇒ Object



8
9
10
# File 'lib/dm-appengine/properties/rating.rb', line 8

def self.load(value, property)
  value.rating if value
end