Method: Gem::Dependency#matches_spec?
- Defined in:
- lib/rubygems/dependency.rb
#matches_spec?(spec) ⇒ Boolean
Does this dependency match spec
?
NOTE: This is not a convenience method. Unlike #match? this method returns true when spec
is a prerelease version even if this dependency is not a prerelease dependency.
247 248 249 250 251 252 |
# File 'lib/rubygems/dependency.rb', line 247 def matches_spec?(spec) return false unless name === spec.name return true if requirement.none? requirement.satisfied_by?(spec.version) end |