module Roda::RodaPlugins::MultiRoute::RequestMethods
Public Instance Methods
Source
# File lib/roda/plugins/multi_route.rb, line 141 def multi_route(namespace=nil) on self.class.named_route_regexp(namespace) do |section| res = route(section, namespace) if defined?(yield) yield else res end end end
Check if the first segment in the path matches any of the current named routes. If so, call that named route. If not, do nothing. If the named route does not handle the request, and a block is given, yield to the block.