Exception: Kentaa::Api::RequestError
- Defined in:
- lib/kentaa/api/exception.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
- #errors ⇒ Object
- #http_code ⇒ Object
-
#initialize(response) ⇒ RequestError
constructor
A new instance of RequestError.
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ RequestError
Returns a new instance of RequestError.
11 12 13 14 |
# File 'lib/kentaa/api/exception.rb', line 11 def initialize(response) @response = response super() end |
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
9 10 11 |
# File 'lib/kentaa/api/exception.rb', line 9 def response @response end |
Instance Method Details
#errors ⇒ Object
16 17 18 |
# File 'lib/kentaa/api/exception.rb', line 16 def errors response.errors end |
#http_code ⇒ Object
20 21 22 |
# File 'lib/kentaa/api/exception.rb', line 20 def http_code response.http_code end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/kentaa/api/exception.rb', line 24 def to_s "#{response.http_code}: #{response.}" end |