Skip to content

Instantly share code, notes, and snippets.

@RobertAudi
Forked from dhrrgn/my_string.rb
Created April 14, 2011 07:49
Show Gist options
  • Save RobertAudi/919090 to your computer and use it in GitHub Desktop.
Save RobertAudi/919090 to your computer and use it in GitHub Desktop.
class String
def humanize
self.split(/[-_]/).map {|w| w.capitalize }.join(' ')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment