Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Sharon Rosner http://hiperu.blogspot.com

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

A replacement for Ruby's File.join

File.join is ugly, there I've said it. So how about being able to replace this:

require File.join(LOAD_PATH, 'foobar')


With this:

require LOAD_PATH/:foobar


Trivial, really:

class String
  def /(o)
    File.join(self, o.to_s)
  end
end
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS