sonic-pi

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

C++

Code. Music. Live.

ActiveSupport::Inflector#camelize

By default, +camelize+ converts strings to UpperCamelCase. If the argument
to +camelize+ is set to <tt>:lower</tt> then +camelize+ produces
lowerCamelCase.

+camelize+ will also convert '/' to '::' which is useful for converting
paths to namespaces.

  'active_model'.camelize                # => "ActiveModel"
  'active_model'.camelize(:lower)        # => "activeModel"
  'active_model/errors'.camelize         # => "ActiveModel::Errors"
  'active_model/errors'.camelize(:lower) # => "activeModel::Errors"

As a rule of thumb you can think of +camelize+ as the inverse of
+underscore+, though there are cases where that does not hold:

  'SSLError'.underscore.camelize # => "SslError"

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-camelize-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#camelize"


# 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-camelize-for-pr

hub pull-request


# Celebrate!