sonic-pi

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

C++

Code. Music. Live.

String#camelcase

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_record'.camelize                # => "ActiveRecord"
  'active_record'.camelize(:lower)        # => "activeRecord"
  'active_record/errors'.camelize         # => "ActiveRecord::Errors"
  'active_record/errors'.camelize(:lower) # => "activeRecord::Errors"

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/core_ext/string/inflections.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-String-camelcase-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/string/inflections.rbgit commit -m "better docs for String#camelcase"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-String-camelcase-for-pr

hub pull-request


# Celebrate!