Sha256: 50918a6b4db7caf9747f57bd63756bdd59b1d3bf47931ef6ee17b0e9144a3a3a
Contents?: true
Size: 671 Bytes
Versions: 7
Compression:
Stored size: 671 Bytes
Contents
# frozen_string_literal: true require 'gems' module Headdesk # # Version information from RubyGems.org # class Versions def self.version Gem::Version.new(VERSION) end def self.versions begin Gems.versions('headdesk').collect do |version| Gem::Version.new(version['number']) end .compact .sort .reverse rescue StandardError nil end end def self.latest_version Gem::Version.new(Gems.latest_version('headdesk')['version']) end def self.latest_version?(version = VERSION) latest_version == Gem::Version.new(version) end end end
Version data entries
7 entries across 7 versions & 1 rubygems