Exception: MySpace::RestException
- Inherits:
-
MySpaceException
- Object
- Exception
- MySpaceException
- MySpace::RestException
- Defined in:
- lib/myspace/exceptions.rb
Overview
A REST call failed for some reason.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(code, message, url) ⇒ RestException
constructor
A new instance of RestException.
- #to_s ⇒ Object
Constructor Details
#initialize(code, message, url) ⇒ RestException
Returns a new instance of RestException.
20 21 22 23 24 |
# File 'lib/myspace/exceptions.rb', line 20 def initialize(code, , url) @code = code @message = @url = url end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
19 20 21 |
# File 'lib/myspace/exceptions.rb', line 19 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
19 20 21 |
# File 'lib/myspace/exceptions.rb', line 19 def @message end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
19 20 21 |
# File 'lib/myspace/exceptions.rb', line 19 def url @url end |
Instance Method Details
#to_s ⇒ Object
26 27 28 |
# File 'lib/myspace/exceptions.rb', line 26 def to_s "#<MySpace::RestException: #{@code}: '#{@message}' loading '#{@url}'>" end |