Class: Karafka::Web::Ui::Routes::Base
- Inherits:
-
Object
- Object
- Karafka::Web::Ui::Routes::Base
- Defined in:
- lib/karafka/web/ui/routes/base.rb
Overview
Base class for all sub-routes that we want to use Splitting this makes the Roda app much smaller and allows us to operate within the scope of one routing namespace easily
Direct Known Subclasses
Pro::Ui::Routes::Base, Assets, Cluster, Consumers, Dashboard, Errors, Jobs, ProOnly, Routing, Status, Support
Class Method Summary collapse
-
.bind(app, request) ⇒ nil
Binds given routing block to Roda.
-
.route(&block) ⇒ Object
Stores the sub-routing.
Class Method Details
.bind(app, request) ⇒ nil
Binds given routing block to Roda
26 27 28 29 30 |
# File 'lib/karafka/web/ui/routes/base.rb', line 26 def bind(app, request) app.instance_exec(request, &@route_block) nil end |
.route(&block) ⇒ Object
Stores the sub-routing
16 17 18 |
# File 'lib/karafka/web/ui/routes/base.rb', line 16 def route(&block) @route_block = block end |