Exception: Train::Error

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

Overview

Base exception for any exception explicitly raised by the Train library.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = '', reason = :not_provided) ⇒ Error

Returns a new instance of Error.



16
17
18
19
# File 'lib/train/errors.rb', line 16

def initialize(message = '', reason = :not_provided)
  super(message)
  @reason = reason
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



14
15
16
# File 'lib/train/errors.rb', line 14

def reason
  @reason
end