Method: Clever::Response#initialize
- Defined in:
- lib/clever/response.rb
#initialize(faraday_response) ⇒ Response
Returns a new instance of Response.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/clever/response.rb', line 9 def initialize(faraday_response) @status = faraday_response.status @raw_body = faraday_response.body return unless faraday_response.body @body = faraday_response.body['data'] @links = faraday_response.body['links'] uri(:self) uri(:next) end |