Class: Puppet::Util::Package::Version::Gem

Inherits:
Gem::Version
  • Object
show all
Defined in:
lib/puppet/util/package/version/gem.rb

Defined Under Namespace

Classes: ValidationFailure

Class Method Summary collapse

Class Method Details

.parse(version) ⇒ Object

Raises:



5
6
7
8
9
10
# File 'lib/puppet/util/package/version/gem.rb', line 5

def self.parse(version)
  raise ValidationFailure, version unless version.is_a? String
  raise ValidationFailure, version unless version =~ ANCHORED_VERSION_PATTERN

  new(version)
end