Sha256: 89df94acaef4e05a06ff9ae826d7a6e56abcade7b60de06520eb860cc8fd1ea2

Contents?: true

Size: 532 Bytes

Versions: 3

Compression:

Stored size: 532 Bytes

Contents

# rubocop:disable all

require 'yaml'

module Familia
  module VERSION
    def self.to_s
      load_config
      version = [@version[:MAJOR], @version[:MINOR], @version[:PATCH]].join('.')
      version += "-#{@version[:PRE]}" if @version[:PRE]
      version
    end
    alias inspect to_s

    def self.version
      @version ||= load_config
      @version
    end

    def self.load_config
      version_file_path = File.join(__dir__, '..', '..', 'VERSION.yml')
      @version = YAML.load_file(version_file_path)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
familia-1.0.0.pre.rc3 lib/familia/version.rb
familia-1.0.0.pre.rc2 lib/familia/version.rb
familia-1.0.0.pre.rc1 lib/familia/version.rb