Exception: MySpace::RestException
- Inherits:
-
MySpaceException
- Object
- Exception
- MySpaceException
- MySpace::RestException
- Defined in:
- lib/myspace/exceptions.rb
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.
15 16 17 18 19 |
# File 'lib/myspace/exceptions.rb', line 15 def initialize(code, , url) @code = code @message = @url = url end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
14 15 16 |
# File 'lib/myspace/exceptions.rb', line 14 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
14 15 16 |
# File 'lib/myspace/exceptions.rb', line 14 def @message end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
14 15 16 |
# File 'lib/myspace/exceptions.rb', line 14 def url @url end |
Instance Method Details
#to_s ⇒ Object
21 22 23 |
# File 'lib/myspace/exceptions.rb', line 21 def to_s "#<MySpace::RestException: #{@code}: '#{@message}' loading '#{@url}'>" end |