Module: Roda::RodaPlugins::HashPaths::RequestMethods
- Defined in:
- lib/roda/plugins/hash_paths.rb
Instance Method Summary collapse
-
#hash_paths(namespace = matched_path) ⇒ Object
Checks the matching hash_path namespace for a branch matching the remaining path, and dispatch to that block if there is one.
Instance Method Details
#hash_paths(namespace = matched_path) ⇒ Object
Checks the matching hash_path namespace for a branch matching the remaining path, and dispatch to that block if there is one.
117 118 119 120 121 122 |
# File 'lib/roda/plugins/hash_paths.rb', line 117 def hash_paths(namespace=matched_path) if (routes = roda_class.opts[:hash_paths][namespace]) && (meth = routes[@remaining_path]) @remaining_path = '' always{scope.send(meth, self)} end end |