class U3dCore::Version
Attributes
major[R]
minor[R]
patch[R]
Public Class Methods
new(version)
click to toggle source
# File lib/u3d_core/version.rb, line 27 def initialize(version) @major, @minor, @patch = version.split('.').map(&:to_i) end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/u3d_core/version.rb, line 39 def <=>(other) (major <=> other.major).nonzero? || (minor <=> other.minor).nonzero? || patch <=> other.patch end
to_a()
click to toggle source
# File lib/u3d_core/version.rb, line 31 def to_a [major, minor, patch].compact end
to_s()
click to toggle source
# File lib/u3d_core/version.rb, line 35 def to_s to_a.join('.') end