Answers for "ruby change directory"

0

ruby change directory

Dir.chdir "directory"

# Usage with a block
Dir.chdir "directory" do
  # block run inside "directory"
  puts Dir.pwd
end
# cwd is unaffected afterwards
puts Dir.pwd
Posted by: Guest on June-22-2021

Browse Popular Code Answers by Language