class Dependabot::Cargo::Version

Constants

ANCHORED_VERSION_PATTERN
VERSION_PATTERN

Public Class Methods

correct?(version) click to toggle source
# File lib/dependabot/cargo/version.rb, line 33
def self.correct?(version)
  return false if version.nil?

  version.to_s.match?(ANCHORED_VERSION_PATTERN)
end
new(version) click to toggle source
Calls superclass method
# File lib/dependabot/cargo/version.rb, line 18
def initialize(version)
  @version_string = version.to_s
  version = version.to_s.split("+").first if version.to_s.include?("+")

  super
end

Public Instance Methods

to_s() click to toggle source
# File lib/dependabot/cargo/version.rb, line 25
def to_s
  @version_string
end