Categories: None [Edit]
need
== 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"
Total
Ranking: 52,576 of 192,405
Downloads: 21,668
Daily
Ranking: 48,055 of 192,384
Downloads: 6
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 45,061 | 26,764 | block-chainable |
| 66,948 | 15,523 | drewolson-diggr |
| 69,890 | 14,573 | diggr |
| 82,547 | 11,346 | simonmenke-hosts |
| 88,921 | 10,019 | defmacro |
| 96,727 | 8,765 | rramsden-diggr |
| 109,947 | 6,952 | dfg59-diggr |
| 131,559 | 4,889 | tending |
| 147,359 | 4,011 | drewolson-defmacro |
| 148,197 | 3,970 | drewolson-block-chainable |
| 148,371 | 3,962 | dfg59-defmacro |
| 148,862 | 3,940 | dfg59-tending |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 2,350 | 9,241,475 | hoe |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | drewolson |