Skip to content

Instantly share code, notes, and snippets.

@schatteleyn
Created December 23, 2011 15:36
Show Gist options
  • Save schatteleyn/1514484 to your computer and use it in GitHub Desktop.
Save schatteleyn/1514484 to your computer and use it in GitHub Desktop.
Implementation in Ruby of https://github.com/schatteleyn/Convertor
#!/usr/bin/env ruby
#coding: utf-8
def convertor(string, delimiter='\n')
string.split(delimiter).each{ |c| c.capitalize! }.join(delimiter)
end
# Will remove capital letter in the rest of the string. Didn't found a simple way to keep them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment