Method: Puppet::Parser::Scope#method_missing
- Defined in:
- lib/puppet/parser/scope.rb
#method_missing(method, *args, &block) ⇒ Object
1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 |
# File 'lib/puppet/parser/scope.rb', line 1047 def method_missing(method, *args, &block) method.to_s =~ /^function_(.*)$/ name = ::Regexp.last_match(1) super unless name super unless Puppet::Parser::Functions.function(name) # In odd circumstances, this might not end up defined by the previous # method, so we might as well be certain. if respond_to? method send(method, *args) else raise Puppet::DevError, _("Function %{name} not defined despite being loaded!") % { name: name } end end |