class Trusty::Sorting::Atoms::Version

Public Class Methods

new(version_string, *minor_and_patch) click to toggle source
Calls superclass method
# File lib/trusty/sorting/atoms/version.rb, line 5
def initialize(version_string, *minor_and_patch)
  case version_string
  when Integer
    super [version_string] + minor_and_patch
  when Array
    super
  when String
    super version_string.split('.').map(&:to_i)
  else
    raise "Invalid version specified"
  end
end