Module: Stratagem::Command

Defined in:
lib/stratagem/command.rb,
lib/stratagem/commands/base.rb,
lib/stratagem/commands/analyze.rb,
lib/stratagem/commands/devel_mock.rb

Defined Under Namespace

Classes: Analyze, Base, DevelMock

Class Method Summary collapse

Class Method Details

.load_command_class(command) ⇒ Object



8
9
10
# File 'lib/stratagem/command.rb', line 8

def load_command_class(command)
  module_eval("Stratagem::Command::#{command.camelize}")
end

.run(command) ⇒ Object



3
4
5
6
# File 'lib/stratagem/command.rb', line 3

def run(command)
  klass = load_command_class(command)
  klass.new.run
end