Method: Aruba::Platforms::UnixPlatform#chdir

Defined in:
lib/aruba/platforms/unix_platform.rb

#chdir(dir_name, &block) ⇒ Object

Change to directory



126
127
128
129
130
131
132
# File 'lib/aruba/platforms/unix_platform.rb', line 126

def chdir(dir_name, &block)
  dir_name = ::File.expand_path(dir_name.to_s)

  with_environment "OLDPWD" => getwd, "PWD" => dir_name do
    ::Dir.chdir(dir_name, &block)
  end
end