Sha256: 2625b0e3114882a43e6769dd581e91d7d8a96c3bc82d0b89173d42af6044fd45

Contents?: true

Size: 572 Bytes

Versions: 15

Compression:

Stored size: 572 Bytes

Contents

h2. Ruby 1.9's relative_relative for Rubinus and MRI 1.8

Here we add in Module RequireRelative method: *require_relative*, and *abs_file*. Example:

bc. require 'rubygems'; require 'require_relative'
require_relative './lib/foo' 
absolute_path = RequireRelative.abs_file

But why *abs_file*? Well, recall that ==__FILE__== does not give an absolute path. So if you have chdir'd before using ==__FILE__==, you might not be able to retrieve the full path.

The latest version is at "http://github.com/rocky/rbx-require-relative/"://github.com/rocky/rbx-require-relative/


Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
candlepin-api-0.4.0 bundle/ruby/1.8/gems/rbx-require-relative-0.0.9/README.textile
rbx-require-relative-0.0.9 README.textile
rbx-require-relative-0.0.7-universal-ruby-1.8.7 README.textile
rbx-require-relative-0.0.7-universal-ruby-1.9.3 README.textile
rbx-require-relative-0.0.7 README.textile
rbx-require-relative-0.0.7-universal-rubinius-1.2 README.textile
rbx-require-relative-0.0.6 README.textile
rbx-require-relative-0.0.6-universal-ruby-1.9.2 README.textile
rbx-require-relative-0.0.6-universal-jruby-1.2 README.textile
rbx-require-relative-0.0.6-universal-ruby-1.8.7 README.textile
rbx-require-relative-0.0.6-universal-ruby-1.9.3 README.textile
rbx-require-relative-0.0.5 README.textile
rbx-require-relative-0.0.5-universal-ruby-1.9.2 README.textile
rbx-require-relative-0.0.5-universal-ruby-1.8.7 README.textile
rbx-require-relative-0.0.5-universal-rubinius-1.2 README.textile