Module: VPM::Commands

Defined in:
lib/vpm/commands.rb,
lib/vpm/commands/list.rb,
lib/vpm/commands/install.rb

Defined Under Namespace

Modules: Install, InstallAllPlugins, List Classes: InvalidCommand, Setup

Class Method Summary collapse

Class Method Details

.[](command) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'lib/vpm/commands.rb', line 2

def self.[](command)
  if command.empty?
    InstallAllPlugins
  elsif self.const_defined?(command)
    self.const_get(command).new
  else
    InvalidCommand.new(command)
  end
end