Class: Gem::Commands::MirrorCommand

Inherits:
Gem::Command show all
Defined in:
lib/rubygems/commands/mirror_command.rb

Instance Attribute Summary

Attributes inherited from Gem::Command

#command, #defaults, #options, #program_name, #summary

Instance Method Summary collapse

Methods inherited from Gem::Command

add_common_option, #add_extra_args, #add_option, add_specific_extra_args, #arguments, #begins?, build_args, build_args=, common_options, #defaults_str, #description, extra_args, extra_args=, #get_all_gem_names, #get_all_gem_names_and_versions, #get_one_gem_name, #get_one_optional_argument, #handle_options, #handles?, #invoke, #invoke_with_build_args, #merge_options, #remove_option, #show_help, #show_lookup_failure, specific_extra_args, specific_extra_args_hash, #usage, #when_invoked

Methods included from UserInteraction

#alert, #alert_error, #alert_warning, #ask, #ask_for_password, #ask_yes_no, #choose_from_list, #say, #terminate_interaction

Methods included from DefaultUserInteraction

ui, #ui, ui=, #ui=, use_ui, #use_ui

Constructor Details

#initializeMirrorCommand

Returns a new instance of MirrorCommand.



4
5
6
7
8
9
10
11
# File 'lib/rubygems/commands/mirror_command.rb', line 4

def initialize
  super('mirror', 'Mirror all gem files (requires rubygems-mirror)')
  begin
    Gem::Specification.find_by_name('rubygems-mirror').activate
  rescue Gem::LoadError
    # no-op
  end
end

Instance Method Details

#executeObject



13
14
15
# File 'lib/rubygems/commands/mirror_command.rb', line 13

def execute
  alert_error "Install the rubygems-mirror gem for the mirror command"
end