123456789_123456789_123456789_123456789_123456789_

Module: Gem::CooldownOption

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/rubygems/cooldown_option.rb

Overview

Mixin methods for the cooldown option for Commands.

Instance Method Summary

Instance Method Details

#add_cooldown_option(group = nil)

Add the --cooldown option to the option parser.

[ GitHub ]

  
# File 'lib/rubygems/cooldown_option.rb', line 12

def add_cooldown_option(group = nil)
  args = [group, "--cooldown DAYS", Integer,
          "Do not use gem versions published within",
          "the last DAYS days (0 disables the cooldown)"].compact

  add_option(*args) do |value, options|
    options[:cooldown] = value
  end
end