Exception: Smartfm::RestClient::Base::RESTError
- Inherits:
-
Exception
- Object
- Exception
- Smartfm::RestClient::Base::RESTError
- Defined in:
- lib/smartfm/rest_clients/base.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ RESTError
constructor
A new instance of RESTError.
- #to_s ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ RESTError
Returns a new instance of RESTError.
8 9 10 11 |
# File 'lib/smartfm/rest_clients/base.rb', line 8 def initialize(params = {}) self.code = params[:code] self. = params[:message] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
6 7 8 |
# File 'lib/smartfm/rest_clients/base.rb', line 6 def code @code end |
#message ⇒ Object
Returns the value of attribute message.
6 7 8 |
# File 'lib/smartfm/rest_clients/base.rb', line 6 def @message end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/smartfm/rest_clients/base.rb', line 13 def to_s "HTTP #{@code}: #{@message}" end |