Class Gem::SourceIndex
In: lib/extlib/rubygems.rb
Parent: Object
Specification SourceIndex lib/extlib/rubygems.rb Gem dot/m_20_0.png

Methods

add_spec  

Public Instance methods

Overwrite this so that a gem of the same name and version won‘t push one from the gems directory out entirely.

@param gem_spec<Gem::Specification> The specification of the gem to add.

[Source]

    # File lib/extlib/rubygems.rb, line 13
13:       def add_spec(gem_spec)
14:         unless gem_spec.instance_variable_get("@loaded_from") &&
15:           @gems[gem_spec.full_name].is_a?(Gem::Specification) &&
16:           @gems[gem_spec.full_name].installation_path ==
17:             File.join(defined?(Merb) && Merb.respond_to?(:root) ? Merb.root : Dir.pwd,"gems")
18: 
19:           @gems[gem_spec.full_name] = gem_spec
20:         end
21:       end

[Validate]