diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/require_relative.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/require_relative.rb b/lib/require_relative.rb new file mode 100644 index 0000000000..34b0948514 --- /dev/null +++ b/lib/require_relative.rb @@ -0,0 +1,6 @@ +def require_relative(relative_feature) + /:/ =~ caller.first + absolute_feature = File.expand_path(File.join(File.dirname($`), relative_feature)) + require absolute_feature +end + |