method

search

v1_9_3_125 - Show latest stable - Class: Gem::SourceIndex
search(gem_pattern, platform_or_requirement = false)
public

Search for a gem by Gem::Dependency gem_pattern. If only_platform is true, only gems matching Gem::Platform.local will be returned. An Array of matching Gem::Specification objects is returned.

For backwards compatibility, a String or Regexp pattern may be passed as gem_pattern, and a Gem::Requirement for platform_only. This behavior is deprecated and will be removed.