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
95 def self.add_function_info(name, info)
96   @metadata[name] = info
97 end
all_function_info() click to toggle source
   # File lib/puppet/parser/functions.rb
87 def self.all_function_info
88   @metadata
89 end
create_adapter(env) click to toggle source
    # File lib/puppet/parser/functions.rb
 82 def self.create_adapter(env)
 83   adapter = super(env)
 84   adapter.module = Module.new do
 85     @metadata = {}
 86 
 87     def self.all_function_info
 88       @metadata
 89     end
 90 
 91     def self.get_function_info(name)
 92       @metadata[name]
 93     end
 94 
 95     def self.add_function_info(name, info)
 96       @metadata[name] = info
 97     end
 98   end
 99   adapter
100 end
get_function_info(name) click to toggle source
   # File lib/puppet/parser/functions.rb
91 def self.get_function_info(name)
92   @metadata[name]
93 end