Sha256: a675ba5d6115da2b46d9975d42fd6bd5c02c5981275b2997c348fca599b0a60f

Contents?: true

Size: 419 Bytes

Versions: 2

Compression:

Stored size: 419 Bytes

Contents

require 'yaml'

module Messenger
  class VersionNumber

    def initialize
      @version = YAML.load_file('VERSION.yml')
    end

    def major
      @version['major']
    end

    def minor
      @version['minor']
    end

    def patch
      @version['patch']
    end

    def to_hash
      @version.dup
    end

    def to_a
      [major, minor, patch]
    end

    def to_s
      to_a.join(".")
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
messenger-0.7.1 lib/messenger/version_number.rb
messenger-0.7.0 lib/messenger/version_number.rb