Exception: Userlist::ConfigurationError
- Defined in:
- lib/userlist.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(key) ⇒ ConfigurationError
constructor
A new instance of ConfigurationError.
- #message ⇒ Object
Constructor Details
#initialize(key) ⇒ ConfigurationError
Returns a new instance of ConfigurationError.
15 16 17 |
# File 'lib/userlist.rb', line 15 def initialize(key) @key = key.to_sym end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
13 14 15 |
# File 'lib/userlist.rb', line 13 def key @key end |
Instance Method Details
#message ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/userlist.rb', line 19 def <<~MESSAGE Missing required configuration value for `#{key}` Please set a value for `#{key}` using an environment variable: USERLIST_#{key.to_s.upcase}=some-value-here or via the `Userlist.configure` method: Userlist.configure do |config| config.#{key} = 'some-value-here' end MESSAGE end |