Exception: Distimo::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Distimo::Error
- Defined in:
- lib/distimo/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#note ⇒ Object
readonly
Returns the value of attribute note.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code, note, link) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(code, note, link) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 |
# File 'lib/distimo/error.rb', line 5 def initialize code,note,link @code = code @note = note @link = link super("Code: #{code}. #{note} See: #{link}") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/distimo/error.rb', line 3 def code @code end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
3 4 5 |
# File 'lib/distimo/error.rb', line 3 def link @link end |
#note ⇒ Object (readonly)
Returns the value of attribute note.
3 4 5 |
# File 'lib/distimo/error.rb', line 3 def note @note end |
Class Method Details
.from_response(response) ⇒ Object
12 13 14 |
# File 'lib/distimo/error.rb', line 12 def self.from_response response new(response["code"],response["message"],response["link"]) end |