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.



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

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

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



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

def reason
  @reason
end