def sudo(*args, &block)
      if block.nil?
        run_command('sudo', args);
      else
        previous_state = @rye_sudo
        enable_sudo
        ret = self.instance_exec *args, &block
        @rye_sudo = previous_state
        ret  
      end
    end
def sudo(*args, &block)
      if block.nil?
        run_command('sudo', args);
      else
        previous_state = @rye_sudo
        enable_sudo
        ret = self.instance_exec *args, &block
        @rye_sudo = previous_state
        ret  
      end
    end
Like batch, except it enables sudo mode before executing the block.
 If the user is already root, this has no effect. Otherwise all
 commands executed in the block will run via sudo.

 If no block is specified then sudo is called just like a regular
 command.