File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ def empty?
47
47
@environments . empty?
48
48
end
49
49
50
+ # Enumerate all services in the configuration.
51
+ #
52
+ # A service is an environment that has a `service_class` key.
53
+ #
54
+ # @parameter implementing [Module] If specified, only services implementing this module will be returned/yielded.
55
+ # @yields {|service| ...} Each service in the configuration.
50
56
def services ( implementing : nil )
51
57
return to_enum ( :services , implementing : implementing ) unless block_given?
52
58
@@ -59,6 +65,9 @@ def services(implementing: nil)
59
65
end
60
66
end
61
67
68
+ # Create a controller for the configured services.
69
+ #
70
+ # @returns [Controller] A controller that can be used to start/stop services.
62
71
def controller ( **options )
63
72
Controller . new ( self . services ( **options ) . to_a )
64
73
end
You can’t perform that action at this time.
0 commit comments