Module: Roda::RodaPlugins::MultiRun::ClassMethods
- Defined in:
- lib/roda/plugins/multi_run.rb
Instance Method Summary collapse
-
#freeze ⇒ Object
Freeze the multi_run apps so that there can be no thread safety issues at runtime.
-
#multi_run_apps ⇒ Object
Hash storing rack applications to dispatch to, keyed by the prefix for the application.
-
#run(prefix, app) ⇒ Object
Add a rack application to dispatch to for the given prefix when r.multi_run is called.
Instance Method Details
#freeze ⇒ Object
Freeze the multi_run apps so that there can be no thread safety issues at runtime.
53 54 55 56 |
# File 'lib/roda/plugins/multi_run.rb', line 53 def freeze opts[:multi_run_apps].freeze super end |
#multi_run_apps ⇒ Object
Hash storing rack applications to dispatch to, keyed by the prefix for the application.
60 61 62 |
# File 'lib/roda/plugins/multi_run.rb', line 60 def multi_run_apps opts[:multi_run_apps] end |
#run(prefix, app) ⇒ Object
Add a rack application to dispatch to for the given prefix when r.multi_run is called.
66 67 68 69 |
# File 'lib/roda/plugins/multi_run.rb', line 66 def run(prefix, app) multi_run_apps[prefix.to_s] = app self::RodaRequest.refresh_multi_run_regexp! end |