Module: Gem

Defined in:
lib/mack/core_extensions/gem_kernel.rb

Class Method Summary collapse

Class Method Details

.__original_set_pathsObject



18
# File 'lib/mack/core_extensions/gem_kernel.rb', line 18

alias_method :__original_set_paths, :set_paths

.clear_searcherObject



9
10
11
# File 'lib/mack/core_extensions/gem_kernel.rb', line 9

def clear_searcher
  @searcher = nil
end

.clear_source_indexObject



5
6
7
# File 'lib/mack/core_extensions/gem_kernel.rb', line 5

def clear_source_index
  @@source_index = nil
end

.reset!Object



13
14
15
16
# File 'lib/mack/core_extensions/gem_kernel.rb', line 13

def reset!
  Gem.clear_source_index
  Gem.clear_searcher
end

.set_paths(*gpaths) ⇒ Object



20
21
22
23
24
25
# File 'lib/mack/core_extensions/gem_kernel.rb', line 20

def set_paths(*gpaths)
  __original_set_paths([@gem_path, gpaths].flatten.compact.uniq.join(File::PATH_SEPARATOR))
  Gem.reset!
  @gem_path.uniq!
  @gem_path
end