class Bump::VersionNumberFactory
The factory class for the version number
Constants
- VERSION_REGEXP
Regexp for version expression
Public Class Methods
from_string(version_string)
click to toggle source
Creates the version number object from the string
@param [String] version_string @return [Bump::VersionNumber]
# File lib/bump/domain/version_number_factory.rb, line 11 def self.from_string(version_string) match = VERSION_REGEXP.match version_string VersionNumber.new match[1].to_i, match[2].to_i, match[3].to_i, match[5] end