Exception: Iknow::RestClient::Base::RESTError
- Inherits:
-
Exception
- Object
- Exception
- Iknow::RestClient::Base::RESTError
- Defined in:
- lib/iknow/rest_client/base.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#message ⇒ Object
Returns the value of attribute message.
-
#uri ⇒ Object
Returns the value of attribute uri.
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.
6 7 8 9 10 |
# File 'lib/iknow/rest_client/base.rb', line 6 def initialize(params = {}) self.code = params[:code] self. = params[:message] self.uri = params[:uri] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/iknow/rest_client/base.rb', line 4 def code @code end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/iknow/rest_client/base.rb', line 4 def @message end |
#uri ⇒ Object
Returns the value of attribute uri.
4 5 6 |
# File 'lib/iknow/rest_client/base.rb', line 4 def uri @uri end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/iknow/rest_client/base.rb', line 12 def to_s "HTTP #{@code}: #{@message} at #{@uri}" end |