Method: Puppet::Functions::Function.new

Defined in:
lib/puppet/functions.rb

.new(closure_scope, given_loader) ⇒ Object

Creates a new function instance in the given closure scope (visibility to variables), and a loader (visibility to other definitions). The created function will either use the ‘given_loader` or (if it has local type aliases) a loader that was constructed from the loader used when loading the function’s class.

TODO: It would be of value to get rid of the second parameter here, but that would break API.



371
372
373
# File 'lib/puppet/functions.rb', line 371

def self.new(closure_scope, given_loader)
  super(closure_scope, @loader || given_loader)
end