Class: Combustion::VersionGate
- Inherits:
-
Object
- Object
- Combustion::VersionGate
- Defined in:
- lib/combustion/version_gate.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#call(*constraints) ⇒ Object
Using matches_spec? instead of match? because the former returns true even when the spec has an appropriate pre-release version.
-
#initialize(name) ⇒ VersionGate
constructor
A new instance of VersionGate.
Constructor Details
#initialize(name) ⇒ VersionGate
Returns a new instance of VersionGate.
11 12 13 |
# File 'lib/combustion/version_gate.rb', line 11 def initialize(name) @name = name end |
Class Method Details
.call(name, *constraints) ⇒ Object
7 8 9 |
# File 'lib/combustion/version_gate.rb', line 7 def self.call(name, *constraints) new(name).call(*constraints) end |
Instance Method Details
#call(*constraints) ⇒ Object
Using matches_spec? instead of match? because the former returns true even when the spec has an appropriate pre-release version.
17 18 19 20 21 |
# File 'lib/combustion/version_gate.rb', line 17 def call(*constraints) return false if spec.nil? dependency(*constraints).matches_spec?(spec) end |