Skip to Content Skip to Search

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)

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

# File ruby/lib/rubygems/path_support.rb, line 26
def initialize(env)
  @home = normalize_home_dir(env["GEM_HOME"] || Gem.default_dir)
  @path = split_gem_path env["GEM_PATH"], @home

  @spec_cache_dir = env["GEM_SPEC_CACHE"] || Gem.default_spec_cache_dir
end