class Gem::Requirement - bundler-1.15.4 Documentation

# class Gem::Requirement

### Public Instance Methods

exact?() click to toggle source

Backport of performance enhancement added to RubyGems 2.2

    # File lib/bundler/rubygems_ext.rb, line 181
    def exact?
      return false unless @requirements.size == 1
      @requirements[0][0] == "="
    end

none?() click to toggle source

Backport of performance enhancement added to RubyGems 1.4

    # File lib/bundler/rubygems_ext.rb, line 172
    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