Method: Gem::Dependency#matching_specs

Defined in:
lib/rubygems/dependency.rb

#matching_specs(platform_only = false) ⇒ Object



273
274
275
276
277
278
279
280
281
282
283
# File 'lib/rubygems/dependency.rb', line 273

def matching_specs(platform_only = false)
  matches = Gem::Specification.find_all_by_name(name, requirement)

  if platform_only
    matches.reject! do |spec|
      spec.nil? || !Gem::Platform.match_spec?(spec)
    end
  end

  matches.reject(&:ignored?)
end