Method: Puppet::Parameter.validate

Defined in:
lib/puppet/parameter.rb

.validate({ ... }) ⇒ void

This method returns an undefined value.

Defines an optional method that is used to validate the parameter’s DSL/string value. Validation should raise appropriate exceptions, the return value of the given block is ignored. The easiest way to raise an appropriate exception is to call the method Util::Errors.fail with the message as an argument. To validate the munged value instead, just munge the value (‘munge(value)`).



254
255
256
# File 'lib/puppet/parameter.rb', line 254

def validate(&block)
  define_method(:unsafe_validate, &block)
end