Class: Gem::Commands::CloneCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::CloneCommand
- Includes:
- GemGit::Helper
- Defined in:
- lib/rubygems/commands/clone_command.rb
Instance Method Summary collapse
-
#description ⇒ Object
:nodoc:.
- #execute ⇒ Object
-
#initialize ⇒ CloneCommand
constructor
A new instance of CloneCommand.
Methods included from GemGit::Helper
#git, #github_clone_url, #github_info_for, #github_token, #github_user, #repository_url_for
Constructor Details
#initialize ⇒ CloneCommand
Returns a new instance of CloneCommand.
4 5 6 |
# File 'lib/rubygems/commands/clone_command.rb', line 4 def initialize super 'clone', "Clone a gem's source from its repository." end |
Instance Method Details
#description ⇒ Object
:nodoc:
8 9 10 |
# File 'lib/rubygems/commands/clone_command.rb', line 8 def description # :nodoc: "Clone a gem's source from its repository." end |
#execute ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/rubygems/commands/clone_command.rb', line 12 def execute gem_name = get_one_optional_argument url = repository_url_for(gem_name) puts "Cloning #{gem_name} from #{url}..." git "clone", url super end |