https://github.com/dluman/include_all
Repository hosting the include_all Ruby gem.
https://github.com/dluman/include_all
includes modules ruby
Last synced: 3 months ago
JSON representation
Repository hosting the include_all Ruby gem.
- Host: GitHub
- URL: https://github.com/dluman/include_all
- Owner: dluman
- License: cc0-1.0
- Created: 2024-07-22T18:23:43.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-07-23T15:20:17.000Z (11 months ago)
- Last Synced: 2025-01-17T05:41:43.396Z (5 months ago)
- Topics: includes, modules, ruby
- Language: Ruby
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `include_all`
You've heard of [`require_all`](https://github.com/jarmo/require_all), now meet `include_all`! Written
for the purpose of including functions from a `require`'d module without typing them all out, this niche,
but personally useful, gem shines brightest when used in conjunction with a Ruby monolith.## Installation
`gem install 'include_all'` or include in your `Gemfile`: `gem 'include_all'`
## Usage
It's best used after something that has a lot of items you'd like to include but not do so individually.
Let's assume that the `methods` module has a bunch of stuff we'd like to bring in.
```ruby
require 'require_all`
require 'include_all`require 'methods'
include_all
```
The `include_all` gem will automatically _diff_ the list of `require`d objects and figure out what's missing.