# File lib/puppet/provider.rb, line 110
110:     def self.make_command_methods(name)
111:         # Now define a method for that command
112:         unless metaclass.method_defined? name
113:             meta_def(name) do |*args|
114:                 unless command(name)
115:                     raise Puppet::Error, "Command %s is missing" % name
116:                 end
117:                 if args.empty?
118:                     cmd = [command(name)]
119:                 else
120:                     cmd = [command(name)] + args
121:                 end
122:                 # This might throw an ExecutionFailure, but the system above
123:                 # will catch it, if so.
124:                 return execute(cmd)
125:             end
126: 
127:             # And then define an instance method that just calls the class method.
128:             # We need both, so both instances and classes can easily run the commands.
129:             unless method_defined? name
130:                 define_method(name) do |*args|
131:                     self.class.send(name, *args)
132:                 end
133:             end
134:         end
135:     end