Class: Gem::Commands::ExecCommand

Inherits:
Gem::Command
  • Object
show all
Defined in:
lib/rubygems/commands/exec_command.rb

Instance Method Summary collapse

Constructor Details

#initializeExecCommand

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

#executeObject



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

def execute
  a = options[:args].dup
  g = a.shift
  system("gem", "install", g)
  system(g, *a)
end