Exception: AppConfigFor::InvalidEnvInheritanceStyle
- Defined in:
- lib/app_config_for/errors.rb
Overview
Raised when an attempting to utilize an unrecognized inheritance style.
Instance Attribute Summary collapse
-
#attempted ⇒ Object
readonly
The inheritance style that was attempted to be used.
-
#valid ⇒ Object
readonly
List of valid styles at the time of the attempt.
Instance Method Summary collapse
-
#initialize(attempted) ⇒ InvalidEnvInheritanceStyle
constructor
A new instance of InvalidEnvInheritanceStyle.
Constructor Details
#initialize(attempted) ⇒ InvalidEnvInheritanceStyle
Returns a new instance of InvalidEnvInheritanceStyle.
45 46 47 48 49 |
# File 'lib/app_config_for/errors.rb', line 45 def initialize(attempted) @attempted = attempted @valid = EnvInheritanceStyles.dup super "Invalid inheritance style #{@attempted.inspect}. Please use one of the following: #{@valid.map(&:inspect).join(', ')}" end |
Instance Attribute Details
#attempted ⇒ Object (readonly)
The inheritance style that was attempted to be used.
41 42 43 |
# File 'lib/app_config_for/errors.rb', line 41 def attempted @attempted end |
#valid ⇒ Object (readonly)
List of valid styles at the time of the attempt.
43 44 45 |
# File 'lib/app_config_for/errors.rb', line 43 def valid @valid end |