Module: ServiceLoader
- Defined in:
- lib/file_sv/service_loader.rb
Overview
Responsible for loading all files in service directory and creating service
Class Method Summary collapse
-
.create_plan_for(folder) ⇒ Object
Create virtual service plan based on folder.
-
.inspect(folder) ⇒ Object
Inspect plan.
-
.serve_plan(thor_options) ⇒ Object
Serve plan.
Class Method Details
.create_plan_for(folder) ⇒ Object
Create virtual service plan based on folder
10 11 12 13 |
# File 'lib/file_sv/service_loader.rb', line 10 def create_plan_for(folder) SvPlan.create folder puts SvPlan.show end |
.inspect(folder) ⇒ Object
Inspect plan
16 17 18 19 |
# File 'lib/file_sv/service_loader.rb', line 16 def inspect(folder) create_plan_for folder puts SvPlan.inspect end |
.serve_plan(thor_options) ⇒ Object
Serve plan
22 23 24 25 26 27 28 |
# File 'lib/file_sv/service_loader.rb', line 22 def serve_plan() require "sinatra" require_relative "virtual_server" GlobalSettings.key = [:key] if [:key] GlobalSettings.cert = [:crt] if [:crt] VirtualServer.run! end |