https://github.com/bkuhlmann/core
A collection of foundational objects.
https://github.com/bkuhlmann/core
core gem ruby
Last synced: 2 months ago
JSON representation
A collection of foundational objects.
- Host: GitHub
- URL: https://github.com/bkuhlmann/core
- Owner: bkuhlmann
- License: other
- Created: 2023-01-07T17:23:27.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-25T02:10:10.000Z (7 months ago)
- Last Synced: 2025-04-13T09:48:43.519Z (6 months ago)
- Topics: core, gem, ruby
- Language: Ruby
- Homepage: https://alchemists.io/projects/core
- Size: 131 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- Funding: .github/FUNDING.yml
- License: LICENSE.adoc
- Citation: CITATION.cff
Awesome Lists containing this project
README
:toc: macro
:toclevels: 5
:figure-caption!:= 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.
toc::[]
== Features
* Provides commonly needed core objects.
== Requirements
. link:https://www.ruby-lang.org[Ruby].
== Setup
To set up the project, run:
[source,bash]
----
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 link:https://rubyapi.org/o/array[Array] instance.
* `Core::EMPTY_DATA`: Provides an empty link:https://alchemists.io/articles/ruby_data[Data] instance.
* `Core::EMPTY_HASH`: Provides an empty link:https://rubyapi.org/o/hash[Hash] instance.
* `Core::EMPTY_SET`: Provides an empty link:https://rubyapi.org/o/set[Set] instance.
* `Core::EMPTY_STRING`: Provides an empty link:https://rubyapi.org/o/string[String] instance.
* `Core::EMPTY_STRUCT`: Provides an empty link:https://alchemists.io/articles/ruby_structs[Struct] instance.=== Functions
The following identity function (lambda) is available as a neutral value in link:https://alchemists.io/articles/ruby_function_composition[function composition]:
[source,ruby]
----
Core::Identity.call "example" # "example"
----== Development
To contribute, run:
[source,bash]
----
git clone https://github.com/bkuhlmann/core
cd core
bin/setup
----You can also use the IRB console for direct access to all objects:
[source,bash]
----
bin/console
----== Tests
To test, run:
[source,bash]
----
bin/rake
----== link:https://alchemists.io/policies/license[License]
== link:https://alchemists.io/policies/security[Security]
== link:https://alchemists.io/policies/code_of_conduct[Code of Conduct]
== link:https://alchemists.io/policies/contributions[Contributions]
== link:https://alchemists.io/policies/developer_certificate_of_origin[Developer Certificate of Origin]
== link:https://alchemists.io/projects/core/versions[Versions]
== link:https://alchemists.io/community[Community]
== Credits
* Built with link:https://alchemists.io/projects/gemsmith[Gemsmith].
* Engineered by link:https://alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].