2011-06-09 01:05:22 +02:00
|
|
|
require 'cat'
|
|
|
|
|
2009-02-25 09:22:11 +01:00
|
|
|
class Person < Hash
|
2010-06-20 22:01:11 +02:00
|
|
|
include ::CouchRest::Model::CastedModel
|
|
|
|
property :pet, 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
|