class Gems::Gem

A gem, as returned by the gem information, search, and activity endpoints @api public

Public Instance Methods

The version, as the ‘Gem::Version` RubyGems orders versions by

This is what {Ordering#<=>} orders a gem by, read from the ‘version` the gem endpoints answer with, which is the version of the gem they answered about: the latest version, for the endpoints that answer with a gem.

@api public @return [::Gem::Version, nil] the version, or nil when the gem carries no version, or one RubyGems cannot

read

@example Read the version as a Gem::Version

gem.gem_version # => Gem::Version.new("8.1.3.1")
# File lib/gems/gem.rb, line 225
def gem_version
  gem_version_of(version)
end