Exception: Viddler::ApiException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/viddler/api_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/viddler/api_exception.rb', line 3

def code
  @code
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/viddler/api_exception.rb', line 3

def description
  @description
end

#detailsObject

Returns the value of attribute details.



3
4
5
# File 'lib/viddler/api_exception.rb', line 3

def details
  @details
end