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 12Object.new.freeze
-
UNIVERSAL =
# File 'lib/bundler/version_ranges.rb', line 35ReqR.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 13Gem::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
#cover?(v) ⇒ Boolean
# File 'lib/bundler/version_ranges.rb', line 15
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