16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/hyraft/rule/command.rb', line 16
def execute
case @command
when "migrate"
MigrationCommand.start(@args)
when "source"
SourceCommand.start(@args)
when "circuit"
CircuitCommand.start(@args)
when "port"
PortCommand.start(@args)
when "web-adapter"
AdapterRequest::WebAdapterCommand.start(@args)
when "data-gateway"
AdapterExhaust::DataGatewayCommand.start(@args)
when "assemble"
AssembleCommand.start(@args)
when "disassemble"
DisassembleCommand.start(@args)
when "template"
TemplateCommand.start(@args)
when "remove-adapter", "rm-adapter"
require 'hyraft/rule/adapter_request/remove_adapter_command'
RemoveAdapterCommand.start(@args)
when "version", "-v", "--version"
puts "Hyraft Rule version #{VERSION}"
when "help", "-h", "h", "--help", nil
show_help
else
puts "Unknown command: #{@command}"
show_help
end
end
|