Skip to content

Instantly share code, notes, and snippets.

@croaky
Created May 14, 2009 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save croaky/111425 to your computer and use it in GitHub Desktop.
Save croaky/111425 to your computer and use it in GitHub Desktop.
# by Giles Bowkett
# http://gilesbowkett.blogspot.com/2009/04/unshiftfiledirnamefile.html
# >> File.here("README.textile")
# => "/Users/dancroak/dev/ecology/README.textile"
class File
def self.here(string)
join(expand_path(dirname(__FILE__), string))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment