class Puppet::Functions::InternalFunction
@note WARNING: This style of creating functions is not public. It is a system
under development that will be used for creating "system" functions.
This is a private, internal, system for creating functions. It supports everything that the public function definition system supports as well as a few extra features such as injection of well known parameters.
@api private
Public Class Methods
builder()
click to toggle source
@api private
# File lib/puppet/functions.rb 663 def self.builder 664 InternalDispatchBuilder.new(dispatcher, Puppet::Pops::Types::PCallableType::DEFAULT, loader) 665 end
Public Instance Methods
call_function_with_scope(scope, function_name, *args, &block)
click to toggle source
Allows the implementation of a function to call other functions by name and pass the caller scope. The callable functions are those visible to the same loader that loaded this function (the calling function).
@param scope [Puppet::Parser::Scope] The caller scope @param function_name [String] The name of the function @param *args [Object] splat of arguments @return [Object] The result returned by the called function
@api public
# File lib/puppet/functions.rb 677 def call_function_with_scope(scope, function_name, *args, &block) 678 internal_call_function(scope, function_name, args, &block) 679 end