Class: Async::App::WebServer
- Inherits:
-
Object
- Object
- Async::App::WebServer
- Includes:
- Component
- Defined in:
- lib/async/app/web_server.rb
Defined Under Namespace
Classes: Router
Constant Summary collapse
- APP_ADDED =
"async-app.web_app.added"
Instance Method Summary collapse
- #add_app(app) ⇒ Object
- #after_init ⇒ Object
-
#initialize(port: 8080) ⇒ WebServer
constructor
A new instance of WebServer.
- #run! ⇒ Object
Methods included from Component
#after_run, included, #init!, #start!, #stop!
Constructor Details
Instance Method Details
#add_app(app) ⇒ Object
29 |
# File 'lib/async/app/web_server.rb', line 29 def add_app(app) = @router.add(app) |
#after_init ⇒ Object
27 |
# File 'lib/async/app/web_server.rb', line 27 def after_init = bus.subscribe(APP_ADDED) { add_app(_1) } |