granth green sumo

turkey sandwiches!

Photo Photo :thumbsup::hamburger: Beets of the Southern Wild part two: now with mountains Photo Photo

Titleize 22 May 2008

ruby, rails

Like many others, I wrote a Ruby port of TitleCase.pl. I used it as excuse to make my first RubyGem.

Install

gem install titleize

Use

require 'titleize'
"an example of titling".titleize  # => "An Example of Titling"

If you prefer, titlecase is an alias to titleize.

Rails Support

If Rails is running, titleize will install itself on Inflector and still convert underscores and CamelCase like the default Rails titleize.

previously: Set an Icon With Rubycocoa