class Puppet::Parser::Functions::AnonymousModuleAdapter
An adapter that ties the anonymous module that acts as the container for all 3x functions to the environment where the functions are created. This adapter ensures that the life-cycle of those functions doesn't exceed the life-cycle of the environment.
@api private
Attributes
module[RW]
Public Class Methods
add_function_info(name, info)
click to toggle source
# File lib/puppet/parser/functions.rb 94 def self.add_function_info(name, info) 95 @metadata[name] = info 96 end
all_function_info()
click to toggle source
# File lib/puppet/parser/functions.rb 86 def self.all_function_info 87 @metadata 88 end
create_adapter(env)
click to toggle source
Calls superclass method
Puppet::Pops::Adaptable::Adapter::create_adapter
# File lib/puppet/parser/functions.rb 81 def self.create_adapter(env) 82 adapter = super(env) 83 adapter.module = Module.new do 84 @metadata = {} 85 86 def self.all_function_info 87 @metadata 88 end 89 90 def self.get_function_info(name) 91 @metadata[name] 92 end 93 94 def self.add_function_info(name, info) 95 @metadata[name] = info 96 end 97 end 98 adapter 99 end
get_function_info(name)
click to toggle source
# File lib/puppet/parser/functions.rb 90 def self.get_function_info(name) 91 @metadata[name] 92 end