Class: Gem::Requirement
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#satisfies?(version) ⇒ Boolean
(also: #satisfies)
TODO: refactor Doubleshot to only use satisfied_by?(Gem::Version) instead of satisfies?(String|Gem::Version).
Instance Method Details
#eql?(other) ⇒ Boolean
11 12 13 |
# File 'lib/ruby/gem/requirement.rb', line 11 def eql?(other) self == other end |
#satisfies?(version) ⇒ Boolean Also known as: satisfies
TODO: refactor Doubleshot to only use satisfied_by?(Gem::Version) instead of satisfies?(String|Gem::Version)
3 4 5 6 7 8 |
# File 'lib/ruby/gem/requirement.rb', line 3 def satisfies?(version) unless version.is_a? Gem::Version version = Gem::Version.new(version.to_s) end satisfied_by? version end |