Class: Puppet::Parser::Functions::AutoloaderDelegate
- Defined in:
- lib/puppet/parser/functions.rb
Instance Attribute Summary collapse
- #delegatee ⇒ Object readonly
Instance Method Summary collapse
-
#initialize ⇒ AutoloaderDelegate
constructor
A new instance of AutoloaderDelegate.
- #load(name, env = Puppet.lookup(:current_environment)) ⇒ Object
- #loadall(env = Puppet.lookup(:current_environment)) ⇒ Object
- #loaded?(name) ⇒ Boolean
Constructor Details
#initialize ⇒ AutoloaderDelegate
Returns a new instance of AutoloaderDelegate.
38 39 40 |
# File 'lib/puppet/parser/functions.rb', line 38 def initialize @delegatee = Puppet::Util::Autoload.new(self, "puppet/parser/functions") end |
Instance Attribute Details
#delegatee ⇒ Object (readonly)
36 37 38 |
# File 'lib/puppet/parser/functions.rb', line 36 def delegatee @delegatee end |
Instance Method Details
#load(name, env = Puppet.lookup(:current_environment)) ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/puppet/parser/functions.rb', line 50 def load(name, env = Puppet.lookup(:current_environment)) if Puppet[:strict] != :off Puppet.warn_once('deprecations', "Puppet::Parser::Functions#load('#{name}')", _("The method 'Puppet::Parser::Functions.autoloader#load(\"%{name}\")' is deprecated in favor of using 'Scope#call_function'.") % {name: name}) end @delegatee.load(name, env) end |
#loadall(env = Puppet.lookup(:current_environment)) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/puppet/parser/functions.rb', line 42 def loadall(env = Puppet.lookup(:current_environment)) if Puppet[:strict] != :off Puppet.warn_once('deprecations', 'Puppet::Parser::Functions#loadall', _("The method 'Puppet::Parser::Functions.autoloader#loadall' is deprecated in favor of using 'Scope#call_function'.")) end @delegatee.loadall(env) end |
#loaded?(name) ⇒ Boolean
58 59 60 61 62 63 64 |
# File 'lib/puppet/parser/functions.rb', line 58 def loaded?(name) if Puppet[:strict] != :off Puppet.warn_once('deprecations', "Puppet::Parser::Functions.loaded?('#{name}')", _("The method 'Puppet::Parser::Functions.autoloader#loaded?(\"%{name}\")' is deprecated in favor of using 'Scope#call_function'.") % {name: name}) end @delegatee.loaded?(name) end |