Module: Ploy::Command

Defined in:
lib/ploy/command.rb,
lib/ploy/command/base.rb,
lib/ploy/command/help.rb,
lib/ploy/command/bless.rb,
lib/ploy/command/client.rb,
lib/ploy/command/oracle.rb,
lib/ploy/command/install.rb,
lib/ploy/command/publish.rb

Defined Under Namespace

Classes: Base, Bless, Client, Help, Install, Oracle, OracleServer, Publish

Class Method Summary collapse

Class Method Details

.lookup(topic) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ploy/command.rb', line 10

def self.lookup(topic)
  lookup = {
    'install' => Ploy::Command::Install,
    'bless'   => Ploy::Command::Bless,
    'help'    => Ploy::Command::Help,
    'publish' => Ploy::Command::Publish,
    'oracle'  => Ploy::Command::Oracle,
    'client'  => Ploy::Command::Client,
  }
  mod = lookup[topic] || lookup['help']
  return mod.new
end