Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem::Cooldown.from_options
from_options(options)
lib/rubygems/cooldown.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/cooldown.rb, line 33
def self.from_options(options)
days = options[:cooldown]
return new(days) unless days.nil?
require_relative "bundler_settings"
new Gem::CooldownSettings.combine(warn_unless_valid(Gem.configuration.cooldown, "the gemrc file"),
warn_unless_valid(Gem::BundlerSettings["cooldown"], "Bundler's configuration"))
end
Creates a Cooldown from the command line options. The –cooldown option wins outright, so --cooldown 0 bypasses the cooldown however the two tools are configured. Without it the :cooldown: gemrc setting and Bundler’s cooldown setting are both read and the longer of the two applies, so a cooldown configured for only one of them still covers gem commands.