Exception: Stockboy::TranslationError
- Inherits:
-
StandardError
- Object
- StandardError
- Stockboy::TranslationError
- Defined in:
- lib/stockboy/exceptions.rb
Overview
TranslationError is a wrapper to store the standard error as well as the key and record which caused it
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(key, record) ⇒ TranslationError
constructor
A new instance of TranslationError.
- #message ⇒ Object
Constructor Details
#initialize(key, record) ⇒ TranslationError
7 8 9 10 |
# File 'lib/stockboy/exceptions.rb', line 7 def initialize (key, record) @key = key @record = record end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
16 17 18 |
# File 'lib/stockboy/exceptions.rb', line 16 def key @key end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
17 18 19 |
# File 'lib/stockboy/exceptions.rb', line 17 def record @record end |
Instance Method Details
#message ⇒ Object
12 13 14 |
# File 'lib/stockboy/exceptions.rb', line 12 def "Attribute [#{key}] caused #{cause.message}" end |