Skip to content

Instantly share code, notes, and snippets.

@jlucasps
Created February 3, 2014 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlucasps/8778079 to your computer and use it in GitHub Desktop.
Save jlucasps/8778079 to your computer and use it in GitHub Desktop.
%w(rb js erb).each do |format|
Dir.glob("app/**/*.#{format}").each do |file|
if File.file? file
puts file
f = File.open(file, "r:UTF-8")
text = f.read
new_text = text.gsub(/\t/, ' ')
File.open(file, "w:UTF-8") do |file|
file.puts new_text
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment