Method: Conduit::ApiResponse#initialize
- Defined in:
- lib/conduit/api_response.rb
#initialize(options = {}) ⇒ ApiResponse
Returns a new instance of ApiResponse.
5 6 7 8 9 10 11 12 |
# File 'lib/conduit/api_response.rb', line 5 def initialize( = {}) @raw_response = [:raw_response] @body = [:body] ||= @raw_response.body @parser = [:parser] @http_status = [:http_status] ||= begin @raw_response.try(:http_status) || @raw_response.try(:status) end end |