Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Relative require, relative autoload and __DIR__
tag: v0.0.3

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
README.rdoc
Rakefile
VERSION
dirge.gemspec

README.rdoc

Dirge

Usage

require 'dirge'
require_relative '../to_my_file'

Or, the much simpler notation

require ~'../to_my_file'

annnd.

class MyAwesomeClass
  autoload_relative :MyConstant, 'my_awesome_class/my_constant'
end

Again, this could be

class MyAwesomeClass
  autoload :MyConstant, ~'my_awesome_class/my_constant'
end

All of this is powered by the new function:

__DIR__
Something went wrong with that request. Please try again.