Class: Couch::Response

Inherits:
HTTPkit::Response
  • Object
show all
Defined in:
lib/couch/response.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build(response) ⇒ Object


5
6
7
# File 'lib/couch/response.rb', line 5

def self.build(response)
  new(response.status, response.headers, response.body)
end

Instance Method Details

#jsonObject


9
10
11
# File 'lib/couch/response.rb', line 9

def json
  @json ||= JSON.parse(body.to_s)
end