Method: Puppet::Functions::DispatcherBuilder#optional_param

Defined in:
lib/puppet/functions.rb

#optional_param(type, name) ⇒ Void

Defines an optional positional parameter with type and name. May not be followed by a required parameter.

Parameters:

  • type (String)

    The type specification for the parameter.

  • name (Symbol)

    The name of the parameter. This is primarily used for error message output and does not have to match an implementation method parameter.

Returns:

  • (Void)


432
433
434
435
# File 'lib/puppet/functions.rb', line 432

def optional_param(type, name)
  internal_param(type, name)
  @max += 1
end