Exception: Surveygizmo::Error

Inherits:
Exception
  • Object
show all
Defined in:
lib/surveygizmo/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message) ⇒ Error

Returns a new instance of Error.


5
6
7
8
# File 'lib/surveygizmo/error.rb', line 5

def initialize code, message
  @code  = code
  @message = message
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code


3
4
5
# File 'lib/surveygizmo/error.rb', line 3

def code
  @code
end

Instance Method Details

#to_sObject


10
11
12
# File 'lib/surveygizmo/error.rb', line 10

def to_s
  "Surveygizmo error! (#{@code}) #{@message}"
end