Module: Tins::StringVersion

Defined in:
lib/tins/string_version.rb

Defined Under Namespace

Classes: Version

Constant Summary collapse

LEVELS =
[ :major, :minor, :build, :revision ].each_with_index.
each_with_object({}) { |(k, v), h| h[k] = v }.freeze
SYMBOLS =
LEVELS.invert.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.compare(version1, operator, version2) ⇒ Object



102
103
104
# File 'lib/tins/string_version.rb', line 102

def self.compare(version1, operator, version2)
  Version.new(version1).send(operator, Version.new(version2))
end

Instance Method Details

#versionObject



98
99
100
# File 'lib/tins/string_version.rb', line 98

def version
  Version.new(self)
end