Exception: AdaptiveConfiguration::RequiredOptionError
- 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:) ⇒ RequiredOptionError
constructor
A new instance of RequiredOptionError.
Constructor Details
#initialize(path: nil, key:) ⇒ RequiredOptionError
Returns a new instance of RequiredOptionError.
29 30 31 32 33 34 |
# File 'lib/adaptive_configuration/errors.rb', line 29 def initialize( path: nil, key: ) path = path ? path.chomp( '/' ) : nil @key = key @keypath = path ? ( path + '/' + @key.to_s ) : key.to_s super( "The parameter '#{@keypath}' is required but no value was given." ) end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
27 28 29 |
# File 'lib/adaptive_configuration/errors.rb', line 27 def key @key end |
#keypath ⇒ Object (readonly)
Returns the value of attribute keypath.
26 27 28 |
# File 'lib/adaptive_configuration/errors.rb', line 26 def keypath @keypath end |