class Faraday::Response
Public Instance Methods
body_object()
click to toggle source
# File lib/sinamak/faraday/response.rb, line 29 def body_object OpenStruct.new(JSON.parse(body)) rescue JSON::ParserError OpenStruct.new end
successful?()
click to toggle source
# File lib/sinamak/faraday/response.rb, line 25 def successful? status_200? && body end
Private Instance Methods
status_200?()
click to toggle source
# File lib/sinamak/faraday/response.rb, line 37 def status_200? status && status == 200 end