Sha256: 87507daee2833ea3adf05f9d21dadb8ead6cc54367fcb36735cf89c277bc2c58

Contents?: true

Size: 582 Bytes

Versions: 1

Compression:

Stored size: 582 Bytes

Contents

module Twitter
  module Version
  module_function

    # @return [Integer]
    def major
      5
    end

    # @return [Integer]
    def minor
      15
    end

    # @return [Integer]
    def patch
      0
    end

    # @return [Integer, NilClass]
    def pre
      nil
    end

    # @return [Hash]
    def to_h
      {
        :major => major,
        :minor => minor,
        :patch => patch,
        :pre => pre,
      }
    end

    # @return [Array]
    def to_a
      to_h.values.compact
    end

    # @return [String]
    def to_s
      to_a.join('.')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twitter-5.15.0 lib/twitter/version.rb