Last active
December 18, 2015 23:39
-
-
Save kainage/5863593 to your computer and use it in GitHub Desktop.
Titleize each line in a file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'active_support' | |
require 'active_support/inflector' | |
file = File.open('output.txt', 'w+') | |
ARGF.readlines.each do |line| | |
file << line.titleize | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment