Sha256: d7598582d98061c47d73d4df7d6f49f0d0e586566ddaa87e9d0d1e07ac2e67f3

Contents?: true

Size: 683 Bytes

Versions: 1

Compression:

Stored size: 683 Bytes

Contents

module Sycamore
  # version representation
  module VERSION
    # the file containing the project version number
    FILE = File.expand_path("../../../VERSION", __FILE__)
    MAJOR, MINOR, TINY, EXTRA = File.read(FILE).chomp.split(".")
    # the normalized version string
    STRING = [MAJOR, MINOR, TINY, EXTRA].compact.join(".").freeze

    ##
    # @return [String]
    def self.to_s
      STRING
    end

    ##
    # @return [String]
    def self.to_str
      STRING
    end

    ##
    # @return [Array(Integer, Integer, Integer)]
    def self.to_a
      [MAJOR, MINOR, TINY]
    end

    ##
    # @return [Boolean]
    def self.==(other)
      other == to_s
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
metaractor-sycamore-0.4.3 lib/sycamore/version.rb