Exception: Bento::ConfigurationError

Inherits:
Error
  • Object
show all
Defined in:
lib/bento-sdk.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#response

Instance Method Summary collapse

Methods inherited from Error

raise_with_response

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

#keyObject (readonly)

Returns the value of attribute key.


25
26
27
# File 'lib/bento-sdk.rb', line 25

def key
  @key
end