Class: Debian::Versions::Stable
Class Method Summary
collapse
Instance Method Summary
collapse
#to_version
Methods inherited from Base
new_from_string, new_if_matches
Constructor Details
#initialize(major, minor, bugfix, revision) ⇒ Stable
Returns a new instance of Stable.
64
65
66
67
68
69
|
# File 'lib/msp_release/debian.rb', line 64
def initialize(major, minor, bugfix, revision)
@major = major
@minor = minor
@bugfix = bugfix
@revision = revision
end
|
Class Method Details
.pattern ⇒ Object
60
61
62
|
# File 'lib/msp_release/debian.rb', line 60
def self.pattern
/^([0-9]+)\.([0-9]+)\.([0-9]+)-([0-9]+)$/
end
|
Instance Method Details
#bump ⇒ Object
71
72
73
|
# File 'lib/msp_release/debian.rb', line 71
def bump
self.class.new(@major, @minor, @bugfix, @revision.to_i + 1).to_s
end
|
#to_s ⇒ Object
75
76
77
|
# File 'lib/msp_release/debian.rb', line 75
def to_s
[@major, @minor, @bugfix].join(".") + "-#{@revision}"
end
|