class Fontist::StyleVersion
Public Class Methods
new(text)
click to toggle source
# File lib/fontist/style_version.rb, line 3 def initialize(text) @text = text end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/fontist/style_version.rb, line 27 def <=>(other) value <=> other.value end
==(other)
click to toggle source
# File lib/fontist/style_version.rb, line 31 def ==(other) value == other.value end
default_value()
click to toggle source
# File lib/fontist/style_version.rb, line 23 def default_value ["0"] end
eql?(other)
click to toggle source
# File lib/fontist/style_version.rb, line 35 def eql?(other) value.eql?(other.value) end
hash()
click to toggle source
# File lib/fontist/style_version.rb, line 39 def hash value.hash end
numbers()
click to toggle source
# File lib/fontist/style_version.rb, line 15 def numbers string_version&.split(".")&.map(&:strip) end
string_version()
click to toggle source
# File lib/fontist/style_version.rb, line 19 def string_version @text&.split(";")&.first end
to_s()
click to toggle source
# File lib/fontist/style_version.rb, line 7 def to_s value.join(" . ") end
value()
click to toggle source
# File lib/fontist/style_version.rb, line 11 def value @value ||= numbers || default_value end