Class: Gem::Commands::ExecCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::ExecCommand
- Defined in:
- lib/rubygems/commands/exec_command.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ ExecCommand
constructor
A new instance of ExecCommand.
Constructor Details
#initialize ⇒ ExecCommand
Returns a new instance of ExecCommand.
2 3 4 |
# File 'lib/rubygems/commands/exec_command.rb', line 2 def initialize super("exec", "Install a gem and execute") end |
Instance Method Details
#execute ⇒ Object
6 7 8 9 10 11 |
# File 'lib/rubygems/commands/exec_command.rb', line 6 def execute a = [:args].dup g = a.shift system("gem", "install", g) system(g, *a) end |