Class: Gem::Version
- Inherits:
-
Object
- Object
- Gem::Version
- Defined in:
- lib/puppet_forge_server/patches/gem.rb
Overview
Copyright 2015 North Development AB
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Instance Method Summary collapse
-
#initialize(version) ⇒ Version
constructor
A new instance of Version.
Constructor Details
#initialize(version) ⇒ Version
Returns a new instance of Version.
18 19 20 |
# File 'lib/puppet_forge_server/patches/gem.rb', line 18 def initialize version @version = self.class.correct?(version) ? version.to_s.strip.gsub('-', '.pre.') : '0' end |