Skip to content

Instantly share code, notes, and snippets.

@rafaelfoster
Created December 10, 2014 19:14
Show Gist options
  • Save rafaelfoster/db3028b77d81ba3d5019 to your computer and use it in GitHub Desktop.
Save rafaelfoster/db3028b77d81ba3d5019 to your computer and use it in GitHub Desktop.
Ruby - Brainstorm
# Write something to somefile :)
fname = "filename"
logfile = File.open(fname, "w")
logfile.puts "Something"
logfile.close
# Write all Args to a file
fname = "filename"
logfile = File.open(fname, "w")
ARGV.each do|a|
logfile.puts "Argument: #{a}"
end
logfile.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment