sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
ActiveSupport::Inflector#singularize
The reverse of +pluralize+, returns the singular form of a word in a string. If passed an optional +locale+ parameter, the word will be singularized using rules defined for that language. By default, this parameter is set to <tt>:en</tt>. 'posts'.singularize # => "post" 'octopi'.singularize # => "octopus" 'sheep'.singularize # => "sheep" 'word'.singularize # => "word" 'CamelOctopi'.singularize # => "CamelOctopus" 'leyes'.singularize(:es) # => "ley"
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 branchgit checkout -b -your-name--update-docs-ActiveSupport--Inflector-singularize-for-pr
# Commit to gitgit add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/inflector/methods.rbgit commit -m "better docs for ActiveSupport::Inflector#singularize"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-ActiveSupport--Inflector-singularize-for-pr
hub pull-request
# Celebrate!