Class: CouchRest::Response
- Inherits:
-
Hash
- Object
- Hash
- CouchRest::Response
- Defined in:
- lib/couchrest/core/document.rb
Direct Known Subclasses
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize(keys = {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(keys = {}) ⇒ Response
Returns a new instance of Response.
3 4 5 6 7 |
# File 'lib/couchrest/core/document.rb', line 3 def initialize(keys = {}) keys.each do |k,v| self[k.to_s] = v end end |
Instance Method Details
#[](key) ⇒ Object
11 12 13 |
# File 'lib/couchrest/core/document.rb', line 11 def [] key super(key.to_s) end |
#[]=(key, value) ⇒ Object
8 9 10 |
# File 'lib/couchrest/core/document.rb', line 8 def []= key, value super(key.to_s, value) end |