Class: Gem::Version

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygems_version_patch.rb

Class Method Summary collapse

Class Method Details

.correct?(version) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
# File 'lib/rubygems_version_patch.rb', line 8

def self.correct?(version)
  return false if version.nil?

  version.to_s.match?(ANCHORED_VERSION_PATTERN)
end