pushdir(path = nil, verbose = @verbose) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/shell.rb, line 175
  def pushdir(path = nil, verbose = @verbose)
    check_point

    if iterator?
      notify("pushdir(with block) #{path}") if verbose
      pushdir(path, nil)
      begin
        yield
      ensure
        popdir
      end
    elsif path
      notify("pushdir #{path}") if verbose
      @dir_stack.push @cwd
      chdir(path, nil)
      notify "dir stack: [#{@dir_stack.join ', '}]"
      self
    else
      notify("pushdir") if verbose
      if pop = @dir_stack.pop
        @dir_stack.push @cwd
        chdir pop
        notify "dir stack: [#{@dir_stack.join ', '}]"
        self
      else
        Shell.Fail DirStackEmpty
      end
    end
    Void.new(self)
  end
Register or log in to add new notes.