Module: Granite::Routing::Declarer
- Defined in:
- lib/granite/routing/declarer.rb
Class Method Summary collapse
Class Method Details
.declare(routing, route, **options) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/granite/routing/declarer.rb', line 5 def declare(routing, route, **) routing.match route.path, via: :all, **, to: dispatcher, as: route.as, granite_action: route.action_path, granite_projector: route.projector_name end |
.dispatcher ⇒ Object
15 16 17 |
# File 'lib/granite/routing/declarer.rb', line 15 def dispatcher @dispatcher ||= Dispatcher.new end |
.reset_dispatcher ⇒ Object
19 20 21 |
# File 'lib/granite/routing/declarer.rb', line 19 def reset_dispatcher dispatcher.reset! end |