def sudo(*arguments)
      options = case arguments.last
                when Hash then arguments.pop
                else           {}
                end

      task = SudoTask.new(options.delete(:sudo) || {})
      task.command = [@path] + arguments

      arguments = task.arguments
      arguments << options unless options.empty?

      return System.sudo(*arguments)
    end
def sudo(*arguments)
      options = case arguments.last
                when Hash then arguments.pop
                else           {}
                end

      task = SudoTask.new(options.delete(:sudo) || {})
      task.command = [@path] + arguments

      arguments = task.arguments
      arguments << options unless options.empty?

      return System.sudo(*arguments)
    end
Runs the program under sudo.

 @overload sudo(*arguments)
   Run the program under `sudo` with the given arguments.

   @param [Array] arguments
     Additional arguments to run the program with.

 @overload sudo(*arguments,options)
   Run the program under `sudo` with the given arguments
   and options.

   @param [Array] arguments
     Additional arguments to run the program with.

   @param [Hash] options
     Additional options to execute the program with.

   @option options [Hash{Symbol => Object}] :sudo
     Additional `sudo` options.

 @return [Boolean]
   Specifies whether the program exited successfully.

 @raise [ProgramNotFound]
   Indicates that the `sudo` program could not be located.

 @since 0.1.8

 @see http://rubydoc.info/stdlib/core/1.9.2/Kernel#spawn-instance_method
   For acceptable options.

 @see SudoTask
   For valid `:sudo` options.