module YARD::GemIndex

Public Instance Methods

all() click to toggle source
# File lib/yard/gem_index.rb, line 25
def all
  each.to_a
end
each(&block) click to toggle source
# File lib/yard/gem_index.rb, line 17
def each(&block)
  if defined?(Gem::Specification) && Gem::Specification.respond_to?(:each)
    Gem::Specification.each(&block)
  else
    Gem.source_index.find_name('').each(&block)
  end
end
find_all_by_name(*args) click to toggle source
# File lib/yard/gem_index.rb, line 9
def find_all_by_name(*args)
  if defined?(Gem::Specification) && Gem::Specification.respond_to?(:find_all_by_name)
    Gem::Specification.find_all_by_name(*args)
  else
    Gem.source_index.find_name(*args)
  end
end