Many languages provide a vast library of methods or functions for developers to use, whereas Ruby only provides basic (albeit powerful) building blocks. At best, this leads to more complex applications and time wasted writing code another developer has probably already written; at worst it results in core class extensions being placed in helper methods or on objects that have no business owning the methods. The lack of a good strategy for managing Ruby extentions really becomes apparent when a developer needs to share his extensions across multiple projects.
Corelib aims to solve this problem by providing a central gem for developers to share extensions & additions to the Ruby core. Corelib focuses on:
- Reducing Code Duplication
- Improving Code Readability
- Sharing Developer Knowledge
- Reducing Errors
- Saving Developers Time
- Improving Code Quality & Performance
We invite all like minded developers to join us in growing the corelib library of extensions.
Corelib was inspired by Smalltalk where it is quite common (and encouraged) to modify base classes with additional convience methods. In addition, Smalltalk defines many useful classes that would benefit the Ruby community such as Set, OrderedSet, SortedCollection, Dictionary, Association, etc...
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install corelib
Browse the /lib/corelib/ directory find methods that extend the chosen classes. All of these methods are now available inside your application without any additional configuration.
If you have developed useful extensions to the Ruby core, please consider adding them to our "little" library.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request