Class: Gem::CommandManager

Inherits:
Object show all
Defined in:
lib/g-gem/gems_commands_with_portage.rb

Overview

module Gem::Portage

Constant Summary collapse

WITH_PORTAGE_COMMANDS =
{
  :install => Gem::Portage::InstallWithPortage,
  :update => Gem::Portage::UpdateWithPortage
}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.wave_all_with_portageObject



64
65
66
67
68
# File 'lib/g-gem/gems_commands_with_portage.rb', line 64

def wave_all_with_portage
  WITH_PORTAGE_COMMANDS.each_key do |name|
    self.instance.with_portage(name.to_s)
  end
end

Instance Method Details

#with_portage(name) ⇒ Object



56
57
58
59
60
61
# File 'lib/g-gem/gems_commands_with_portage.rb', line 56

def with_portage(name)
  return self.class.instance[name] unless 
    WITH_PORTAGE_COMMANDS.has_key?(name.to_sym)
  Gem::Command::WithPortage.wave_with_portage(self.class.instance[name], 
                                              WITH_PORTAGE_COMMANDS[name.to_sym])
end