Gem::PathSupport facilitates the GEM_HOME and GEM_PATH environment settings to the rest of RubyGems.

Methods
N
Attributes
[R] home

The default system path for managing Gems.

[R] path

Array of paths to search for Gems.

Class Public methods
new(env=ENV)

Constructor. Takes a single argument which is to be treated like a hashtable, or defaults to ENV, the system environment.

# File lib/rubygems/path_support.rb, line 19
def initialize(env=ENV)
  @env = env

  # note 'env' vs 'ENV'...
  @home     = env["GEM_HOME"] || ENV["GEM_HOME"] || Gem.default_dir

  if File::ALT_SEPARATOR then
    @home   = @home.gsub(File::ALT_SEPARATOR, File::SEPARATOR)
  end

  self.path = env["GEM_PATH"] || ENV["GEM_PATH"]
end