RubyGems Navigation menu

simonmenke-need 1.1.0

DESCRIPTION: Need makes ruby relative requires just work. Simply need a file with a relative path and the file will always be required correctly, regardless of what file your application is being launched through. Typically, ruby projects would unshift lib onto $PATH or use the File.dirname(__FILE__) trick. Using need means you don’t have to worry about either of these. Assume you have two files, one directly in lib and the other in lib/extensions. Let’s assume that file_a in lib requires file_b, in lib/extensions. Previously, you would doing some crazy load path unshifting or use the __FILE__ trick to make these requires flexible enough to work when your app is being accessed by rake, through a test suite, or required as a gem. Now, just use need. In file_a: need{“extensions/file_b”} need “extensions/file_b”

Gemfile:
= Copy to clipboard Copied!

install:
=

Versions:

  1. 1.1.0 - August 10, 2014 (5.5 KB)

Runtime Dependencies (1):

hoe >= 1.5.3

Authors:

  • Drew Olson

SHA 256 checksum:

b4e9f10e43ad36ccca0e7729aad5c8ff1f30e1ccb8b3908ec5b5dc2afd47a293

Total downloads 3,207

For this version 3,207

Licenses:

N/A

Required Ruby Version: >= 0

Links: