Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Ruby core extensions and String#camelcase.
Extensions to the Ruby core classes live in the rake/core_ext directory and are enabled by updating rake/core_extensions.rb to require them. The actual extension consists of two parts, both in the rake/core_ext directory. Part One is a file named after the Ruby core class that you intend to extend, for example rake/core_ext/string.rb. It's responsibility is to require all files implementing extensions to a particular core Ruby class. Part Two is a subdirectory named after the Ruby core class you're extending. For example, rake/core_ext/string/. This subdirectory holds all the files that actually extend the core class named by the subdirectory. Use multiple files to liberally modularize your extension code. Finally, bringing everything together for use by the project rakefile, the rake/core_extensions.rb file requires all Ruby core extensions you've provided in Part One and Two. Confusing? Don't let the above wording slow you down one bit. Check out the code for the String#camelcase extension as managed by the following files: * rakefile.rb * rake/core_extensions.rb * rake/core_ext/string.rb * rake/core_ext/string/conversions.rb
- Loading branch information