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,868 of 188,724
Downloads: 21,362
Daily
Ranking: 62,701 of 188,690
Downloads: 2
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 44,271 | 26,533 | block-chainable |
| 66,254 | 15,284 | drewolson-diggr |
| 68,952 | 14,416 | diggr |
| 81,919 | 11,132 | simonmenke-hosts |
| 87,823 | 9,909 | defmacro |
| 96,052 | 8,603 | rramsden-diggr |
| 108,911 | 6,850 | dfg59-diggr |
| 130,252 | 4,825 | tending |
| 146,069 | 3,951 | drewolson-defmacro |
| 147,006 | 3,907 | drewolson-block-chainable |
| 147,219 | 3,896 | dfg59-defmacro |
| 147,766 | 3,872 | dfg59-tending |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 2,312 | 9,084,235 | hoe |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | drewolson |