couchrest_model/lib/couchrest/core/response.rb

16 lines
276 B
Ruby
Raw Normal View History

module CouchRest
class Response < Hash
2009-03-03 06:15:02 +01:00
def initialize(pkeys = {})
pkeys ||= {}
pkeys.each do |k,v|
self[k.to_s] = v
end
end
2009-03-03 06:15:02 +01:00
def []=(key, value)
super(key.to_s, value)
end
2009-03-03 06:15:02 +01:00
def [](key)
super(key.to_s)
end
end
end