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