Exception: YouGotListed::Error

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, error) ⇒ Error

Returns a new instance of Error.



6
7
8
9
10
# File 'lib/you_got_listed/error.rb', line 6

def initialize(code, error)
  @code = code
  @error = error
  super(message)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



4
5
6
# File 'lib/you_got_listed/error.rb', line 4

def code
  @code
end

#errorObject (readonly)

Returns the value of attribute error.



4
5
6
# File 'lib/you_got_listed/error.rb', line 4

def error
  @error
end

Instance Method Details

#messageObject



12
13
14
# File 'lib/you_got_listed/error.rb', line 12

def message
  "YouGotListed Error: #{@error} (code: #{@code})"
end