Class: Bundler::VersionRanges::ReqR
| Relationships & Source Files | |
| Namespace Children | |
| Classes: | |
| Super Chains via Extension / Inclusion / Inheritance | |
| Class Chain: 
          self,
          Struct
         | |
| Instance Chain: 
          self,
          Struct
         | |
| Inherits: | Struct 
 | 
| Defined in: | lib/bundler/version_ranges.rb, lib/bundler/version_ranges.rb | 
Constant Summary
- 
    INFINITY =
    
 # File 'lib/bundler/version_ranges.rb', line 33begin inf = Object.new def inf.to_s "∞" end def inf.<=>(other) return 0 if other.equal?(self) 1 end inf.freeze end 
- 
    UNIVERSAL =
    
 # File 'lib/bundler/version_ranges.rb', line 75ReqR.new(ReqR::Endpoint.new(Gem::Version.new("0.a"), true), ReqR::Endpoint.new(ReqR::INFINITY, false)).freeze 
- 
    ZERO =
    
 # File 'lib/bundler/version_ranges.rb', line 44Gem::Version.new("0.a") 
Instance Attribute Summary
- #empty? ⇒ Boolean readonly
- #left rw
- #right rw
- #single? ⇒ Boolean readonly
Instance Method Summary
Instance Attribute Details
    #empty?  ⇒ Boolean  (readonly)
  
  [ GitHub ]
#left (rw)
[ GitHub ]# File 'lib/bundler/version_ranges.rb', line 6
ReqR = Struct.new(:left, :right)
#right (rw)
[ GitHub ]# File 'lib/bundler/version_ranges.rb', line 6
ReqR = Struct.new(:left, :right)
    #single?  ⇒ Boolean  (readonly)
  
  [ GitHub ]
Instance Method Details
#<=>(other)
[ GitHub ]
    #cover?(v)  ⇒ Boolean 
  
# File 'lib/bundler/version_ranges.rb', line 46
def cover?(v) return false if left.inclusive && left.version > v return false if !left.inclusive && left.version >= v if right.version != INFINITY return false if right.inclusive && right.version < v return false if !right.inclusive && right.version <= v end true end