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

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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: ValidationFailure

Class Method Summary collapse

Class Method Details

.parse(version) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Raises:


3
4
5
6
7
# File 'lib/puppet/util/package/version/gem.rb', line 3

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