Class: Tidepool::ErrorMessage
- Inherits:
-
Object
- Object
- Tidepool::ErrorMessage
- Defined in:
- lib/tidepool/error_message.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ ErrorMessage
constructor
A new instance of ErrorMessage.
- #message ⇒ Object
- #tidepool_message ⇒ Object
Constructor Details
#initialize(response) ⇒ ErrorMessage
Returns a new instance of ErrorMessage.
3 4 5 6 |
# File 'lib/tidepool/error_message.rb', line 3 def initialize(response) @response = response @base_message = "Error #{response.code}" end |
Instance Method Details
#message ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/tidepool/error_message.rb', line 8 def if "#{} #{}" else end end |
#tidepool_message ⇒ Object
16 17 18 |
# File 'lib/tidepool/error_message.rb', line 16 def response["reason"] || response["message"] end |