jchris / couchrest

A RESTful CouchDB client based on Heroku's RestClient and Couch.js - you want the version at http://github.com/couchrest/couchrest

This URL has Read+Write access

jchris (author)
Fri May 08 19:00:39 -0700 2009
commit  8363aa629837d333d04373523fdcc10b392fb368
tree    8ce1f5e86b0a7ccc28e37b5599c120a431116f4f
parent  d3a7717363e61e1f13e7358127b188e2ac95d0b7
couchrest / lib / couchrest / core / response.rb
100644 16 lines (16 sloc) 0.276 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module CouchRest
  class Response < Hash
    def initialize(pkeys = {})
      pkeys ||= {}
      pkeys.each do |k,v|
        self[k.to_s] = v
      end
    end
    def []=(key, value)
      super(key.to_s, value)
    end
    def [](key)
      super(key.to_s)
    end
  end
end