Hi--
I have these extensions I've used on a couple of occasions. I just
tested them out again and they still seem to be working fine. Maybe
other's are interested. Or perhaps there are other better ways to do
these things?
module Gem
def self.active?(gemname)
@loaded_specs ||= Hash.new
@loaded_specs.key? gemname
end
def self.gemspec(gemname)
@loaded_specs[gemname] if active?(gemname)
end
def self.gempath(gemname, subdir=nil)
if active?(gemname)
if subdir
File.join( @loaded_specs[gemname].full_gem_path, subdir )
else
@loaded_specs[gemname].full_gem_path
end
end
end
end
Thanks,
Trans.
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers