Module: Versionomy::Format::Standard::ExtraMethods

Defined in:
lib/versionomy/format_definitions/standard.rb

Overview

Extra methods added to version values that use the standard schema.

Instance Method Summary collapse

Instance Method Details

#prerelease?Boolean

Returns true if the version is a prerelease version


116
117
118
# File 'lib/versionomy/format_definitions/standard.rb', line 116

def prerelease?
  self.release_type != :final
end

#releaseObject

Returns the release for this version. For example, converts “1.2.0a1” to “1.2.0”. Non-prerelease versions return themselves.


125
126
127
# File 'lib/versionomy/format_definitions/standard.rb', line 125

def release
  self.change(:release_type => :final)
end