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,086 of 186,995
Downloads: 20,763
Daily
Ranking: 58,419 of 186,959
Downloads: 10
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
Rank | Downloads | Name |
---|---|---|
43,119 | 26,151 | block-chainable |
65,407 | 14,831 | drewolson-diggr |
67,621 | 14,108 | diggr |
81,321 | 10,714 | simonmenke-hosts |
86,375 | 9,685 | defmacro |
95,097 | 8,307 | rramsden-diggr |
107,991 | 6,592 | dfg59-diggr |
128,747 | 4,666 | tending |
144,316 | 3,827 | drewolson-defmacro |
145,473 | 3,774 | drewolson-block-chainable |
146,097 | 3,747 | dfg59-defmacro |
146,336 | 3,736 | dfg59-tending |
Depends on
Rank | Downloads | Name |
---|---|---|
2,259 | 8,893,641 | hoe |
Owners
# | Gravatar | Handle |
---|---|---|
1 | drewolson |