Class: Gem::Requirement
- Inherits:
-
Object
- Object
- Gem::Requirement
- Defined in:
- lib/bundler/rubygems_ext.rb
Instance Method Summary collapse
-
#exact? ⇒ Boolean
Backport of performance enhancement added to RubyGems 2.2.
-
#none? ⇒ Boolean
Backport of performance enhancement added to RubyGems 1.4.
Instance Method Details
#exact? ⇒ Boolean
Backport of performance enhancement added to RubyGems 2.2
183 184 185 186 |
# File 'lib/bundler/rubygems_ext.rb', line 183 def exact? return false unless @requirements.size == 1 @requirements[0][0] == "=" end |
#none? ⇒ Boolean
Backport of performance enhancement added to RubyGems 1.4
174 175 176 177 178 179 180 |
# File 'lib/bundler/rubygems_ext.rb', line 174 def none? # note that it might be tempting to replace with with RubyGems 2.0's # improved implementation. Don't. It requires `DefaultRequirement` to be # defined, and more importantantly, these overrides are not used when the # running RubyGems defines these methods to_s == ">= 0" end |