Class: Dependabot::GithubActions::Version
- Inherits:
-
Gem::Version
- Object
- Gem::Version
- Dependabot::GithubActions::Version
- Defined in:
- lib/dependabot/github_actions/version.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(version) ⇒ Version
constructor
A new instance of Version.
Constructor Details
#initialize(version) ⇒ Version
Returns a new instance of Version.
8 9 10 11 |
# File 'lib/dependabot/github_actions/version.rb', line 8 def initialize(version) version = Version.remove_leading_v(version) super end |
Class Method Details
.correct?(version) ⇒ Boolean
19 20 21 22 |
# File 'lib/dependabot/github_actions/version.rb', line 19 def self.correct?(version) version = Version.remove_leading_v(version) super end |
.remove_leading_v(version) ⇒ Object
13 14 15 16 17 |
# File 'lib/dependabot/github_actions/version.rb', line 13 def self.remove_leading_v(version) return version unless version.to_s.match?(/\Av([0-9])/) version.to_s.gsub(/\Av/, "") end |