Skip to content

Instantly share code, notes, and snippets.

@abinoam
Last active December 17, 2015 00:39
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 abinoam/5522530 to your computer and use it in GitHub Desktop.
Save abinoam/5522530 to your computer and use it in GitHub Desktop.
append_data_to_daily_files - Ruby Talk
def append_data_to_daily_files
Dir.entries('A').each do |file|
next unless file.match(/today/i)
File.open(File.join("A",file), 'a') do |file|
file.puts("hello")
end
end
end
@abinoam
Copy link
Author

abinoam commented May 5, 2013

Updated the line to the tip from Hassan Schroeder hassan.schroeder@gmail.com

Now it reads

next unless file.match(/today/i)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment