Skip to content

Instantly share code, notes, and snippets.

@jasonroelofs
Created March 11, 2010 17:50
Show Gist options
  • Select an option

  • Save jasonroelofs/329421 to your computer and use it in GitHub Desktop.

Select an option

Save jasonroelofs/329421 to your computer and use it in GitHub Desktop.
class Parent
def show_my_path(binding)
puts File.expand_path(File.dirname(eval("__FILE__", binding)))
end
end
class App < Parent
end
App.new.show_my_path(binding)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment