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'
|
2009-07-20 23:17:27 +02:00
|
|
|
property :name, :type => ['String']
|
2009-02-25 09:22:11 +01:00
|
|
|
|
|
|
|
def last_name
|
|
|
|
name.last
|
|
|
|
end
|
|
|
|
end
|