Class: Gem::Commands::MavenCommand

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

Instance Method Summary collapse

Constructor Details

#initializeMavenCommand

Returns a new instance of MavenCommand.



6
7
8
# File 'lib/rubygems/commands/maven_command.rb', line 6

def initialize
  super 'maven', 'Install a Maven-published Java library as a gem'
end

Instance Method Details

#executeObject



10
11
12
13
14
15
# File 'lib/rubygems/commands/maven_command.rb', line 10

def execute
  args = options[:args]

  raise "usage: gem maven <group id> <artifact id> <version>" unless args.length == 3
  MavenGem.install(*options[:args])
end