Other types

These types aren’t quite like the others.

The Callable data type

The Callable data type matches callable lambdas provided as function arguments.

There is no way to interact with Callable values in the Puppet language, but Ruby functions written to the function API (Puppet::Functions) can use Callable to inspect the lambda provided to the function.

The full signature for Callable is:

Callable[ (<DATA TYPE>, ...,) <MIN COUNT>, <MAX COUNT>, <BLOCK TYPE> ]

All of these parameters are optional.

PositionParameterData typeDefault valueDescription
1 to nData typeTypenoneAny number of data types, representing the data type of each argument the lambda accepts.
-3 (third last)Minimum countInteger0The minimum number of arguments the lambda accepts. This parameter accepts the value default, which uses its default value 0.
-2 (second last)Maximum countIntegerinfinityThe maximum number of arguments the lambda accepts. This parameter accepts the value default, which uses its default value, infinity.
-1 (last)Block typeType[Callable]noneThe block_type of the lambda.