Exception: SealClub::Error

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status: 0, detail: nil) ⇒ Error

Returns a new instance of Error.



18
19
20
21
22
# File 'lib/sealclub.rb', line 18

def initialize(message, status: 0, detail: nil)
  super(message)
  @status = status
  @detail = detail || message
end

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail.



16
17
18
# File 'lib/sealclub.rb', line 16

def detail
  @detail
end

#statusObject (readonly)

Returns the value of attribute status.



16
17
18
# File 'lib/sealclub.rb', line 16

def status
  @status
end