https://github.com/zimbatm/relative-require.rb
Relative require to the file loading in ruby
https://github.com/zimbatm/relative-require.rb
Last synced: about 1 year ago
JSON representation
Relative require to the file loading in ruby
- Host: GitHub
- URL: https://github.com/zimbatm/relative-require.rb
- Owner: zimbatm
- Created: 2010-11-27T10:37:21.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T14:47:40.000Z (over 2 years ago)
- Last Synced: 2025-05-26T12:11:41.876Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
relative-require.rb
===================
This module provides relative requires to the requiring file. This should solve
most of the uglyness of pushing to $LOAD_PATH and loading #expand_path-ed files.
Tested with ruby-1.8.7 and ruby-1.9.2
by Jonas Pfenniger
Example project
---------------
This example shows that you don't have to mess with $LOAD_PATH anymore.
$ export RUBYOPT=-relative-require
lib/
* myproject.rb
* myproject/xyz.rb
test/
test.rb
in myproject.rb
require './myproject/xyz.rb'
in test.rb
require '../lib/myproject.rb'
Licence
-------
This project is under public licence. http://unlicence.org