End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::QueryUtils#check_installed_gems
check_installed_gems(gem_names)
lib/rubygems/query_utils.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/query_utils.rb, line 74
def check_installed_gems(gem_names)
exit_code = 0
if args.empty? && !gem_name?
alert_error "You must specify a gem name"
exit_code = 4
elsif gem_names.count > 1
alert_error "You must specify only ONE gem!"
exit_code = 4
else
installed = installed?(gem_names.first, options[:version])
installed = !installed unless options[:installed]
say(installed)
exit_code = 1 if !installed
end
exit_code
end
No documentation available
See also
#check_installed_gems?
#args
#add_query_options
#display_header
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0