Class: Dependabot::Version
- Inherits:
-
Gem::Version
- Object
- Gem::Version
- Dependabot::Version
- Defined in:
- lib/dependabot/version.rb
Class Method Summary collapse
-
.correct?(version) ⇒ Boolean
Opt-in to Rubygems 4 behavior.
Instance Method Summary collapse
-
#initialize(version) ⇒ Version
constructor
A new instance of Version.
- #to_semver ⇒ Object
Constructor Details
#initialize(version) ⇒ Version
Returns a new instance of Version.
6 7 8 9 10 |
# File 'lib/dependabot/version.rb', line 6 def initialize(version) @original_version = version super end |
Class Method Details
.correct?(version) ⇒ Boolean
Opt-in to Rubygems 4 behavior
13 14 15 16 17 |
# File 'lib/dependabot/version.rb', line 13 def self.correct?(version) return false if version.nil? version.to_s.match?(ANCHORED_VERSION_PATTERN) end |
Instance Method Details
#to_semver ⇒ Object
19 20 21 |
# File 'lib/dependabot/version.rb', line 19 def to_semver @original_version end |