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,172 of 190,901
Downloads: 21,535
Daily
Ranking: 41,725 of 190,870
Downloads: 6
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 44,620 | 26,665 | block-chainable |
| 66,581 | 15,404 | drewolson-diggr |
| 69,399 | 14,502 | diggr |
| 82,163 | 11,249 | simonmenke-hosts |
| 88,330 | 9,966 | defmacro |
| 96,340 | 8,689 | rramsden-diggr |
| 109,433 | 6,898 | dfg59-diggr |
| 130,892 | 4,855 | tending |
| 146,665 | 3,980 | drewolson-defmacro |
| 147,621 | 3,935 | drewolson-block-chainable |
| 147,816 | 3,926 | dfg59-defmacro |
| 148,267 | 3,904 | dfg59-tending |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 2,336 | 9,177,105 | hoe |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | drewolson |