Core
Provides a collection of core objects missing from the standard Ruby distribution. This is meant to provide common objects for engineering advanced architctures in order to reduce duplication, improve performance, and improve memory usage.
- Features
- Requirements
- Setup
- Usage
- Constants
- Functions
- Development
- Tests
- License
- Security
- Code of Conduct
- Contributions
- Developer Certificate of Origin
- Versions
- Community
- Credits
Features
-
Provides commonly needed core objects.
Requirements
-
Ruby.
Setup
To set up the project, run:
bin/setup
Usage
The following details what is currently available for use.
Constants
The following empty constants are frozen by default and available for use as core objects for use throughout your application.
-
Core::EMPTY_ARRAY
: Provides an empty Array instance. -
Core::EMPTY_DATA
: Provides an empty Data instance. -
Core::EMPTY_HASH
: Provides an empty Hash instance. -
Core::EMPTY_SET
: Provides an empty Set instance. -
Core::EMPTY_STRING
: Provides an empty String instance. -
Core::EMPTY_STRUCT
: Provides an empty Struct instance.
Functions
The following identity function (lambda) is available as a neutral value in function composition:
Core::Identity.call "example" # "example"
Development
To contribute, run:
git clone https://github.com/bkuhlmann/core
cd core
bin/setup
You can also use the IRB console for direct access to all objects:
bin/console
Tests
To test, run:
bin/rake
Credits
-
Built with Gemsmith.
-
Engineered by Brooke Kuhlmann.