couchrest_model/spec/fixtures/more/person.rb

9 lines
160 B
Ruby

class Person < Hash
include ::CouchRest::CastedModel
property :pet, :cast_as => 'Cat'
property :name, [String]
def last_name
name.last
end
end