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
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/hyraft/rule/command.rb', line 19
def execute
case @command
when "in-api"
require 'hyraft/rule/base/in_api_command'
Base::InApiCommand.start(@args)
when "out-data"
require 'hyraft/rule/base/out_data_command'
Base::OutDataCommand.start(@args)
when "engine"
require 'hyraft/rule/circuit/engine_command'
Circuit::EngineCommand.start(@args)
when "port"
require 'hyraft/rule/circuit/port_command'
Circuit::PortCommand.start(@args)
when "cable"
require 'hyraft/rule/connectors/cable_command'
Connectors::CableCommand.start(@args)
when "jwt"
require 'hyraft/rule/jwt/jwt_command'
Jwt::JwtCommand.start(@args)
when "api-routes"
require 'hyraft/rule/router/api_routes_command'
Router::ApiRoutesCommand.start(@args)
when "routes"
require 'hyraft/rule/router/web_routes_command'
Router::WebRoutesCommand.start(@args)
when "template"
require 'hyraft/rule/template/template_command'
Template::TemplateCommand.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
|