Method: UriService::Client::Response#initialize
- Defined in:
- lib/uri_service/client/response.rb
#initialize(response) ⇒ Response
Returns a new instance of Response.
8 9 10 11 12 |
# File 'lib/uri_service/client/response.rb', line 8 def initialize(response) @status = response.status @raw = response.body @data = raw.nil? || raw.empty? ? nil : JSON.parse(raw) end |