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: 53,106 of 196,250
Downloads: 22,157
Daily
Ranking: 25,308 of 196,218
Downloads: 5
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 45,947 | 27,069 | block-chainable |
| 68,082 | 15,720 | drewolson-diggr |
| 71,161 | 14,715 | diggr |
| 83,779 | 11,505 | simonmenke-hosts |
| 90,378 | 10,130 | defmacro |
| 98,297 | 8,864 | rramsden-diggr |
| 111,398 | 7,061 | dfg59-diggr |
| 133,479 | 4,966 | tending |
| 149,368 | 4,082 | drewolson-defmacro |
| 150,438 | 4,031 | drewolson-block-chainable |
| 150,522 | 4,027 | dfg59-defmacro |
| 150,957 | 4,008 | dfg59-tending |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 2,383 | 9,520,259 | hoe |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | drewolson |