Skip to content
No description or website provided.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
README.textile
Rakefile
pathname_local.gemspec

README.textile

Pathname.local(path)

Super-tiny gem that adds Pathname.local(path):

Pathname.module_eval do def self.local(path) new(File.expand_path(File.join(‘..’, path), caller.last)) end end

So, e.g. in a test_helper.rb file one could do:

fixtures_path = Pathname.local(‘fixtures’)

Instead of the much more verbose:

fixtures_path = Pathname.new(File.expand_path(‘../fixtures’, FILE))
Something went wrong with that request. Please try again.