Skip to content

Instantly share code, notes, and snippets.

@maxluzuriaga
Created September 25, 2010 22:59
Show Gist options
  • Save maxluzuriaga/597391 to your computer and use it in GitHub Desktop.
Save maxluzuriaga/597391 to your computer and use it in GitHub Desktop.
puts "Welcome back!"
result = ""
until result == "quit"
print "> "
result = gets.chomp
result_array = result.split(' ').each do |word|
word.downcase!
proper_nouns = ["ecuador", "diego", "luzuriaga"]
word.capitalize! if proper_nouns.include?(word)
end
result_array[0].capitalize!
output = result_array.join(' ')
print "\n<em>#{output}</em>\n\n" unless result == "quit"
end
puts "Goodbye!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment