Exception: AllNewsAPI::Error
- Inherits:
-
StandardError
- Object
- StandardError
- AllNewsAPI::Error
- Defined in:
- lib/allnewsapi/error.rb
Overview
Custom error class for AllNewsAPI errors
Instance Attribute Summary collapse
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(status_code, message) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(status_code, message) ⇒ Error
Returns a new instance of Error.
10 11 12 13 |
# File 'lib/allnewsapi/error.rb', line 10 def initialize(status_code, ) @status_code = status_code super() end |
Instance Attribute Details
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
6 7 8 |
# File 'lib/allnewsapi/error.rb', line 6 def status_code @status_code end |