Sha256: fb36285598a0d6b3f262a7994beca96e0e2f1f8a4840d4bd5e44b2f5dd42e39a
Contents?: true
Size: 549 Bytes
Versions: 21
Compression:
Stored size: 549 Bytes
Contents
# Call a lambda with the given arguments. Since the parameters of the lambda # are local to the lambda's scope, this can be used to create private sections # of logic in a class so that the variables are not visible outside of the # class. # # @example Using with # # # notices the array [1, 2, 'foo'] # with(1, 2, 'foo') |$x, $y, $z| { notice [$x, $y, $z] } # # @since 4.0.0 # Puppet::Functions.create_function(:with) do dispatch :with do repeated_param 'Any', :arg block_param end def with(*args) yield(*args) end end
Version data entries
21 entries across 21 versions & 1 rubygems