Exception: Userlist::ConfigurationError

Inherits:
Error
  • Object
show all
Defined in:
lib/userlist.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ ConfigurationError

Returns a new instance of ConfigurationError.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/userlist.rb', line 19

def initialize(key)
  @key = key.to_sym

  super("    Missing required configuration value for `\#{key}`\n\n    Please set a value for `\#{key}` using an environment variable:\n\n      USERLIST_\#{key.to_s.upcase}=some-value-here\n\n    or via the `Userlist.configure` method:\n\n      Userlist.configure do |config|\n        config.\#{key} = 'some-value-here'\n      end\n  MESSAGE\nend\n")

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



17
18
19
# File 'lib/userlist.rb', line 17

def key
  @key
end