Class: SimpleBackup::Version
- Inherits:
-
Object
- Object
- SimpleBackup::Version
- Defined in:
- lib/simple_backup/version.rb
Constant Summary collapse
- MAJOR =
0- MINOR =
4- PATCH =
3- PRE_RELEASE =
nil
Class Method Summary collapse
Class Method Details
.format(value) ⇒ Object
15 16 17 |
# File 'lib/simple_backup/version.rb', line 15 def self.format(value) value.gsub(/a-zA-Z0-9\_ /, '').gsub(' ', '_').downcase end |
.get ⇒ Object
8 9 10 11 12 13 |
# File 'lib/simple_backup/version.rb', line 8 def self.get version = "#{MAJOR}.#{MINOR}.#{PATCH}" version += "-#{self.format(PRE_RELEASE)}" unless PRE_RELEASE.nil? version end |