Class: Puppet::Parser::Functions::AutoloaderDelegate

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/parser/functions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAutoloaderDelegate

Returns a new instance of AutoloaderDelegate


36
37
38
# File 'lib/puppet/parser/functions.rb', line 36

def initialize
  @delegatee = Puppet::Util::Autoload.new(self, "puppet/parser/functions")
end

Instance Attribute Details

#delegateeObject (readonly)


34
35
36
# File 'lib/puppet/parser/functions.rb', line 34

def delegatee
  @delegatee
end

Instance Method Details

#load(name, env = Puppet.lookup(:current_environment)) ⇒ Object


48
49
50
51
52
53
54
# File 'lib/puppet/parser/functions.rb', line 48

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


40
41
42
43
44
45
46
# File 'lib/puppet/parser/functions.rb', line 40

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


56
57
58
59
60
61
62
# File 'lib/puppet/parser/functions.rb', line 56

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