module Roda::RodaPlugins::HashBranches::RequestMethods
def hash_branches(namespace=matched_path)
Checks the matching hash_branch namespace for a branch matching the next
def hash_branches(namespace=matched_path) rp = @remaining_path return unless rp.getbyte(0) == 47 # "/" if routes = roda_class.opts[:hash_branches][namespace] if segment_end = rp.index('/', 1) if meth = routes[rp[0, segment_end]] @remaining_path = rp[segment_end, 100000000] always{scope.send(meth, self)} end elsif meth = routes[rp] @remaining_path = '' always{scope.send(meth, self)} end end end