Method: Puppet::Plugins.method_missing
- Defined in:
- lib/vendor/puppet/util/plugins.rb
.method_missing(hook, *args, &block) ⇒ Object
Calling methods (hooks) on the class calls the method of the same name on
all plugins that use that hook, passing in the same arguments to each
and returning an array containing the results returned by each plugin as
an array of [plugin_name,result] pairs.
61 62 63 64 65 |
# File 'lib/vendor/puppet/util/plugins.rb', line 61 def self.method_missing(hook,*args,&block) known. select { |p| p.respond_to? hook }. collect { |p| [p.name,p.send(hook,*args,&block)] } end |