RubyGems Navigation menu

drewolson-need 1.1.0

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”

Gemfile:
= 复制到剪贴板 已复制!

安装:
=

版本列表:

  1. 1.1.0 - August 11, 2014 (4.5 KB)

Runtime 依赖 (1):

hoe >= 1.8.2

作者:

  • Drew Olson

SHA 256 校验和:

b78ede4e1b144b688d23aae778ac55b9f5b982f977a7bf226e4e1d17aed63f25

下载总量 3,528

这个版本 3,528

许可:

需要的 Ruby 版本: >= 0

链接: