sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

ActiveSupport::Inflector#titleize

Capitalizes all the words and replaces some characters in the string to
create a nicer looking title. +titleize+ is meant for creating pretty
output. It is not used in the Rails internals.

+titleize+ is also aliased as +titlecase+.

  'man from the boondocks'.titleize   # => "Man From The Boondocks"
  'x-men: the last stand'.titleize    # => "X Men: The Last Stand"
  'TheManWithoutAPast'.titleize       # => "The Man Without A Past"
  'raiders_of_the_lost_ark'.titleize  # => "Raiders Of The Lost Ark"

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/inflector/methods.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ActiveSupport--Inflector-titleize-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/inflector/methods.rbgit commit -m "better docs for ActiveSupport::Inflector#titleize"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ActiveSupport--Inflector-titleize-for-pr

hub pull-request


# Celebrate!