Exception: Stocks::RetrievalError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Stocks::RetrievalError
- Defined in:
- lib/stocks/errors.rb
Overview
An error raised when data retrieval fails
Class Method Summary collapse
-
.message(symbol) ⇒ Object
Generates the error message that is to be displayed.
Instance Method Summary collapse
-
#initialize(symbol) ⇒ RetrievalError
constructor
A new instance of RetrievalError.
Constructor Details
#initialize(symbol) ⇒ RetrievalError
Returns a new instance of RetrievalError.
7 8 9 |
# File 'lib/stocks/errors.rb', line 7 def initialize(symbol) super(self.class.(symbol)) end |
Class Method Details
.message(symbol) ⇒ Object
Generates the error message that is to be displayed.
Args
-
symbolThe symbol to insert into the error message
Returns
An error message representing the error
17 18 19 |
# File 'lib/stocks/errors.rb', line 17 def self.(symbol) ERROR_MESSAGE % symbol end |