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,688 of 192,934
Downloads: 21,728
Daily
Ranking: 119,028 of 192,908
Downloads: 0
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 45,192 | 26,827 | block-chainable |
| 67,040 | 15,591 | drewolson-diggr |
| 70,034 | 14,612 | diggr |
| 82,713 | 11,385 | simonmenke-hosts |
| 89,125 | 10,046 | defmacro |
| 96,903 | 8,793 | rramsden-diggr |
| 110,087 | 6,978 | dfg59-diggr |
| 131,826 | 4,903 | tending |
| 147,644 | 4,024 | drewolson-defmacro |
| 148,395 | 3,987 | drewolson-block-chainable |
| 148,636 | 3,975 | dfg59-defmacro |
| 149,109 | 3,954 | dfg59-tending |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 2,360 | 9,278,809 | hoe |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | drewolson |