Exception: Bento::ConfigurationError
- Defined in:
- lib/bento-sdk.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(key) ⇒ ConfigurationError
constructor
A new instance of ConfigurationError.
Methods inherited from Error
Constructor Details
#initialize(key) ⇒ ConfigurationError
Returns a new instance of ConfigurationError.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/bento-sdk.rb', line 27 def initialize(key) @key = key.to_sym super <<~CONFIG_ERROR_MESSAGE Missing config value for `#{key}` Please set a value for `#{key}` using an environment variable: BENTO_#{key.to_s.upcase}=your-value or via the `Bento.configure` method: Bento.configure do |config| config.#{key} = 'your-value' end CONFIG_ERROR_MESSAGE end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
25 26 27 |
# File 'lib/bento-sdk.rb', line 25 def key @key end |