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