Exception: AdaptiveConfiguration::InOptionError
- Defined in:
- lib/adaptive_configuration/errors.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#keypath ⇒ Object
readonly
Returns the value of attribute keypath.
Instance Method Summary collapse
-
#initialize(path: nil, key:, option:, value:) ⇒ InOptionError
constructor
A new instance of InOptionError.
Constructor Details
#initialize(path: nil, key:, option:, value:) ⇒ InOptionError
Returns a new instance of InOptionError.
43 44 45 46 47 48 |
# File 'lib/adaptive_configuration/errors.rb', line 43 def initialize( path: nil, key:, option:, value: ) path = path ? path.chomp( '/' ) : nil @key = key @keypath = path ? ( path + '/' + @key.to_s ) : key.to_s super( "The parameter '#{@keypath}' must be in '#{option.to_s}' but '#{value.to_s}' was given." ) end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
41 42 43 |
# File 'lib/adaptive_configuration/errors.rb', line 41 def key @key end |
#keypath ⇒ Object (readonly)
Returns the value of attribute keypath.
40 41 42 |
# File 'lib/adaptive_configuration/errors.rb', line 40 def keypath @keypath end |