Exception: InvalidDefaultForOptional

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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

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