Method: Gem::SpecificationRecord#stubs_for_pattern

Defined in:
lib/rubygems/specification_record.rb

#stubs_for_pattern(pattern, match_platform = true) ⇒ Object

Finds stub specifications matching a pattern in the record, optionally filtering out specs not matching the current platform



67
68
69
70
71
72
73
# File 'lib/rubygems/specification_record.rb', line 67

def stubs_for_pattern(pattern, match_platform = true)
  installed_stubs = installed_stubs(pattern)
  installed_stubs.select! {|s| Gem::Platform.match_spec? s } if match_platform
  stubs = installed_stubs + Gem::Specification.default_stubs(pattern)
  Gem::Specification._resort!(stubs)
  stubs
end