Class: Gem::Commands::CompactCommand

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

Instance Method Summary collapse

Constructor Details

#initializeCompactCommand

Returns a new instance of CompactCommand.



7
8
9
# File 'lib/rubygems/commands/compact_command.rb', line 7

def initialize
  super('compact', description)
end

Instance Method Details

#descriptionObject



3
4
5
# File 'lib/rubygems/commands/compact_command.rb', line 3

def description
  'Clean up gems for all the paths'
end

#executeObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/rubygems/commands/compact_command.rb', line 11

def execute
  require 'rubygems/commands/cleanup_command'

  cmd = Gem::Commands::CleanupCommand.new
  args, build_args = options.values_at(:args, :build_args)
  args.unshift('--no-check-development')

  with_path do
    cmd.invoke_with_build_args(args, build_args)
  end
end