HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/with.rb
Puppet::Parser::Functions::newfunction(
  :with,
  :type => :rvalue,
  :arity => -1,
  :doc => <<-DOC
Call a lambda code block 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:

     # notices the array [1, 2, 'foo']
     with(1, 2, 'foo') |$x, $y, $z| { notice [$x, $y, $z] }

- since 3.7.0
- note requires future parser
DOC
) do |args|
  function_fail(["with() is only available when parser/evaluator future is in effect"])
end