Requirable
File require logic extracted from Padrino's gem.
Installation
Add this line to your application's Gemfile:
gem 'requirable'
And then execute:
$ bundle
Or install it yourself as:
$ gem install requirable
Usage
|-- app
| |-- models
| | |-- user.rb
| |-- routes
| | |-- home.rb
| | |-- users.rb
| | |-- items.rb
|-- config
| |-- configs.rb
| |-- env.rb
|-- app.rb
|-- boot.rb
Let's say this is your root, you can use Requirable to load all your files:
Requirable.load! 'config', 'app'
Or just tell which folders and files you want to require:
Requirable.load "./config/*.rb"
Requirable.load "./app/**{,/*/**}/*.rb"
Contributing
- Fork it ( http://github.com/joaquimadraz/requirable/fork )
- 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