Exception: Viddler::ApiException
- Inherits:
-
StandardError
- Object
- StandardError
- Viddler::ApiException
- Defined in:
- lib/viddler/api_exception.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#description ⇒ Object
Returns the value of attribute description.
-
#details ⇒ Object
Returns the value of attribute details.
Instance Method Summary collapse
-
#initialize(code, description, details) ⇒ ApiException
constructor
A new instance of ApiException.
Constructor Details
#initialize(code, description, details) ⇒ ApiException
Returns a new instance of ApiException.
5 6 7 8 9 10 11 |
# File 'lib/viddler/api_exception.rb', line 5 def initialize(code, description, details) self.code = code.to_i self.description = description self.details = details super("\##{self.code}: #{self.description} (#{self.details})") end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/viddler/api_exception.rb', line 3 def code @code end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/viddler/api_exception.rb', line 3 def description @description end |
#details ⇒ Object
Returns the value of attribute details.
3 4 5 |
# File 'lib/viddler/api_exception.rb', line 3 def details @details end |