module Roda::RodaPlugins::PathMatchers::RequestMethods

def match_extension(ext)

request path end with the extension.
Match when the current segment ends with the given extension.
def match_extension(ext)
  match_suffix(".#{ext}")
end

def match_prefix(prefix)

Match when the current path segment starts with the given prefix.
def match_prefix(prefix)
  consume(self.class.cached_matcher([:prefix, prefix]){/#{prefix}([^\\\/]+)/})
end

def match_suffix(suffix)

Match when the current path segment ends with the given suffix.
def match_suffix(suffix)
  consume(self.class.cached_matcher([:suffix, suffix]){/([^\\\/]+)#{suffix}/})
end