class RainforestQA::APIResponseError
Attributes
message[R]
status[R]
Public Class Methods
new(body)
click to toggle source
Calls superclass method
# File lib/rainforestqa/errors.rb, line 8 def initialize(body) @message, @status = parse_error_body(body) super(message) end
Private Instance Methods
parse_error_body(body)
click to toggle source
# File lib/rainforestqa/errors.rb, line 14 def parse_error_body(body) if body.nil? ['', nil] elsif body[:error] [body[:error], body[:success]] end end