I do not know if I understood your need (my English is bad: - /); In any case, if the problem is to determine the directories that will be loaded when you need the stone, you can use Gem::Specification.lib_dirs_glob :
Gem::Specification.find_by_name('irbtools').lib_dirs_glob
Thus, a possible implementation of load_from could be:
def load_from(gem_name, path) path_to_load = File.join(Gem::Specification.find_by_name(gem_name).lib_dirs_glob, path) Dir.glob(path_to_load).each(&method(:load)) end
Attempting to download Thor::CoreExt :
Thor::CoreExt
It works on my machine with ruby ββ1.9.3 and gem 1.8.21.
source share