Method: Copland::Implementation::Startup#start
- Defined in:
- lib/copland/impl/startup.rb
#start ⇒ Object
Invoked by Copland when the registry has been initialized. This allows the service to then instantiate each of its registered services in turn, in the order they were requested.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/copland/impl/startup.rb', line 94 def start list = [] @clients.each do |client| enabled = client.fetch( 'enabled', true ) if enabled service_name = client['service'] before = [ *( client['before'] || [] ) ] after = [ *( client['after'] || [] ) ] list << StartupClient.new( @registry.service_point( service_name ), before, after ) end end list = Orderer.order( list ) list.each { |client| client.point.instance } end |