Sha256: 727ed3b2af983c95d02b95e97bb5b19ff2f1714ace57c7b727cc9795331486d9

Contents?: true

Size: 484 Bytes

Versions: 1

Compression:

Stored size: 484 Bytes

Contents

module Cp8Cli
  VERSION = "4.0.1"

  class Version
    def self.latest?
      new.latest?
    end

    def latest?
      latest_version <= current_version
    end

    private

      def latest_version
        @_latest_version ||= Gem.latest_version_for("cp8_cli") || first_version
      end

      def current_version
        @_current_version ||= Gem::Version.new(VERSION)
      end

      def first_version
        @_first_version ||= Gem::Version.new("1.0.0")
      end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cp8_cli-4.0.1 lib/cp8_cli/version.rb