Module: CouchRest::JsonResponse
- Defined in:
- lib/couchrest/json_response.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#raw ⇒ Object
Returns the value of attribute raw.
Class Method Summary collapse
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
5 6 7 |
# File 'lib/couchrest/json_response.rb', line 5 def headers @headers end |
#raw ⇒ Object
Returns the value of attribute raw.
5 6 7 |
# File 'lib/couchrest/json_response.rb', line 5 def raw @raw end |
Class Method Details
.create(body) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/couchrest/json_response.rb', line 6 def JsonResponse.create(body) result = JSON.parse(body) result.extend(JsonResponse) result.headers = body.headers result.raw = body.to_s result end |