module Roda::RodaPlugins::SymbolMatchers::RequestMethods
def _match_symbol(s)
if the symbol is registered. Otherwise, call super for the default
Use regular expressions to the symbol-specific regular expression
def _match_symbol(s) meth = :"match_symbol_#{s}" if respond_to?(meth, true) # Allow calling private match methods _, re, convert_meth = send(meth) if re consume(re, convert_meth) else # defined in class_matchers plugin _consume_segment(convert_meth) end else super end end
def _match_symbol_regexp(s)
Return the symbol-specific regular expression if one is registered.
def _match_symbol_regexp(s) meth = :"match_symbol_#{s}" if respond_to?(meth, true) # Allow calling private match methods re, = send(meth) re else super end end