Exception: InvalidDefaultForOptional
- Inherits:
-
StandardError
- Object
- StandardError
- InvalidDefaultForOptional
- Defined in:
- lib/puppet-lint-param_comment-check/param.rb
Overview
An optional parameter does not have “undef” as the default
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token, default_value) ⇒ InvalidDefaultForOptional
constructor
A new instance of InvalidDefaultForOptional.
Constructor Details
#initialize(token, default_value) ⇒ InvalidDefaultForOptional
Returns a new instance of InvalidDefaultForOptional.
32 33 34 35 |
# File 'lib/puppet-lint-param_comment-check/param.rb', line 32 def initialize(token, default_value) @token = token super "Invalid value '#{default_value}' for an parameter of type Optional. undef is required" end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
37 38 39 |
# File 'lib/puppet-lint-param_comment-check/param.rb', line 37 def token @token end |