2009-02-25 09:22:11 +01:00
|
|
|
class Person < Hash
|
|
|
|
include ::CouchRest::CastedModel
|
2009-05-29 07:42:30 +02:00
|
|
|
property :pet, :cast_as => 'Cat'
|
2010-06-18 01:24:49 +02:00
|
|
|
property :name, [String]
|
2009-02-25 09:22:11 +01:00
|
|
|
|
|
|
|
def last_name
|
|
|
|
name.last
|
|
|
|
end
|
2010-06-18 01:24:49 +02:00
|
|
|
end
|