class Dir

Copyright 2011 Tommy Poulter

This file is part of basechip.

basechip is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

basechip is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with basechip. If not, see <www.gnu.org/licenses/>.

Public Class Methods

popd() click to toggle source
# File lib/dir.rb, line 23
def self.popd
  if d = @@pushd_stack.pop
    Dir.chdir d
  else
    raise "directory stack empty, pwd = #{Dir.pwd}"
  end
end
pushd(d) click to toggle source
# File lib/dir.rb, line 19
def self.pushd(d)
  @@pushd_stack << Dir.pwd
  Dir.chdir d
end