Class: Blinkist::Config::ErrorHandler
- Inherits:
-
Object
- Object
- Blinkist::Config::ErrorHandler
- Defined in:
- lib/blinkist/config/error_handlers/error_handler.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call(key, scope) ⇒ Object
-
#initialize(env, app_name) ⇒ ErrorHandler
constructor
A new instance of ErrorHandler.
Constructor Details
#initialize(env, app_name) ⇒ ErrorHandler
Returns a new instance of ErrorHandler.
4 5 6 7 |
# File 'lib/blinkist/config/error_handlers/error_handler.rb', line 4 def initialize(env, app_name) @env = env @app_name = app_name end |
Instance Method Details
#call(key, scope) ⇒ Object
9 10 11 |
# File 'lib/blinkist/config/error_handlers/error_handler.rb', line 9 def call(key, scope) raise ValueMissingError, "Missing value for #{key} in the scope: #{scope || '<default>'} (Please check the configuration for missing keys)" end |