Exception: Alchemy::Configuration::ConfigurationError
- Inherits:
-
StandardError
- Object
- StandardError
- Alchemy::Configuration::ConfigurationError
- Defined in:
- lib/alchemy/configuration.rb
Instance Attribute Summary collapse
-
#allowed_classes ⇒ Object
readonly
Returns the value of attribute allowed_classes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name, value, allowed_classes) ⇒ ConfigurationError
constructor
A new instance of ConfigurationError.
Constructor Details
#initialize(name, value, allowed_classes) ⇒ ConfigurationError
Returns a new instance of ConfigurationError.
21 22 23 24 25 26 27 |
# File 'lib/alchemy/configuration.rb', line 21 def initialize(name, value, allowed_classes) @name = name @value = value @allowed_classes = allowed_classes = allowed_classes.map(&:name).to_sentence(two_words_connector: " or ", last_word_connector: ", or ") super("Invalid configuration value for #{name}: #{value.inspect} (expected #{expected_classes_message})") end |
Instance Attribute Details
#allowed_classes ⇒ Object (readonly)
Returns the value of attribute allowed_classes.
19 20 21 |
# File 'lib/alchemy/configuration.rb', line 19 def allowed_classes @allowed_classes end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
19 20 21 |
# File 'lib/alchemy/configuration.rb', line 19 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
19 20 21 |
# File 'lib/alchemy/configuration.rb', line 19 def value @value end |