Exception: CoverMyMeds::Error::HTTPError
- Inherits:
-
StandardError
- Object
- StandardError
- CoverMyMeds::Error::HTTPError
- Defined in:
- lib/covermymeds_api/error.rb
Instance Attribute Summary collapse
-
#error_json ⇒ Object
readonly
Returns the value of attribute error_json.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, message) ⇒ HTTPError
constructor
A new instance of HTTPError.
- #message ⇒ Object
Constructor Details
#initialize(status, message) ⇒ HTTPError
Returns a new instance of HTTPError.
5 6 7 8 |
# File 'lib/covermymeds_api/error.rb', line 5 def initialize status, @status = status @error_json = end |
Instance Attribute Details
#error_json ⇒ Object (readonly)
Returns the value of attribute error_json.
14 15 16 |
# File 'lib/covermymeds_api/error.rb', line 14 def error_json @error_json end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
14 15 16 |
# File 'lib/covermymeds_api/error.rb', line 14 def status @status end |
Instance Method Details
#message ⇒ Object
10 11 12 |
# File 'lib/covermymeds_api/error.rb', line 10 def "#{@status}: #{@error_json}" end |