Sha256: fae3f06190911c3615a93f23caaa498c5b266484147efe57ddf9ec58d404ff4e
Contents?: true
Size: 444 Bytes
Versions: 4
Compression:
Stored size: 444 Bytes
Contents
class ImageOptim class BinResolver class SimpleVersion include Comparable attr_reader :parts def initialize(str) @str = String(str) @parts = @str.split('.').map(&:to_i).reverse.drop_while(&:zero?).reverse end def to_s @str end def <=>(other) other = self.class.new(other) unless other.is_a?(self.class) parts <=> other.parts end end end end
Version data entries
4 entries across 4 versions & 1 rubygems