Method: Puppet::Provider.command
- Defined in:
- lib/puppet/provider.rb
.command(name) ⇒ String
Returns the absolute path to the executable for the command referenced by the given name.
138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/puppet/provider.rb', line 138 def self.command(name) name = name.intern if defined?(@commands) and command = @commands[name] # nothing elsif superclass.respond_to? :command and command = superclass.command(name) # nothing else raise Puppet::DevError, "No command #{name} defined for provider #{self.name}" end which(command) end |