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: 51,725 of 188,317
Downloads: 21,306
Daily
Ranking: 52,707 of 188,299
Downloads: 4
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 44,116 | 26,469 | block-chainable |
| 66,056 | 15,256 | drewolson-diggr |
| 68,718 | 14,398 | diggr |
| 81,710 | 11,106 | simonmenke-hosts |
| 87,558 | 9,899 | defmacro |
| 95,835 | 8,584 | rramsden-diggr |
| 108,680 | 6,834 | dfg59-diggr |
| 129,998 | 4,810 | tending |
| 145,673 | 3,947 | drewolson-defmacro |
| 146,623 | 3,901 | drewolson-block-chainable |
| 146,889 | 3,888 | dfg59-defmacro |
| 147,524 | 3,861 | dfg59-tending |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 2,310 | 9,055,715 | hoe |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | drewolson |