couchrest_model/spec/fixtures/more/person.rb

9 lines
No EOL
170 B
Ruby

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