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: 48,916 of 180,661
Downloads: 19,784
Daily
Ranking: 75,347 of 180,641
Downloads: 0
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
Rank | Downloads | Name |
---|---|---|
40,838 | 25,122 | block-chainable |
63,405 | 13,962 | drewolson-diggr |
64,792 | 13,507 | diggr |
79,573 | 9,997 | simonmenke-hosts |
83,402 | 9,235 | defmacro |
92,719 | 7,811 | rramsden-diggr |
105,746 | 6,160 | dfg59-diggr |
125,840 | 4,387 | tending |
141,049 | 3,596 | drewolson-defmacro |
142,513 | 3,535 | drewolson-block-chainable |
143,489 | 3,493 | dfg59-defmacro |
143,636 | 3,487 | dfg59-tending |
Depends on
Rank | Downloads | Name |
---|---|---|
1,963 | 8,428,430 | hoe |
Owners
# | Gravatar | Handle |
---|---|---|
1 | drewolson |