public Method

Sys.indir(dir) { || ... }

Make dir the current working directory for the duration of executing the given block.

Source Code

# File rake/contrib/sys.rb, line 144
def indir(dir)
  olddir = Dir.pwd
  Dir.chdir(dir)
  yield
ensure
  Dir.chdir(olddir)
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.