Exception: AppConfigFor::InvalidEnvInheritanceStyle

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

Overview

Raised when an attempting to utilize an unrecognized inheritance style.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attemptedObject (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

#validObject (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