I am writing a gem, which should automatically define the path of the file where this gem is called.
Here is how it should work:
# inside some custom.rb file
require 'my_super_gem'
# after require gem should automatically define the path of custom.rb file
I thought that __FILE__ inside gem module is a good idea, but it defines the path of the gem module, but not of the file with require 'my_super_gem'.
Are there any possible solutions?
parse the result of
or try to look into