module Roda::RodaPlugins::PathMatchers::RequestMethods
Public Instance Methods
Source
# File lib/roda/plugins/path_matchers.rb, line 36 def match_extension(ext) match_suffix(".#{ext}") end
Match when the current segment ends with the given extension. request path end with the extension.
Source
# File lib/roda/plugins/path_matchers.rb, line 41 def match_prefix(prefix) consume(self.class.cached_matcher([:prefix, prefix]){/#{prefix}([^\\\/]+)/}) end
Match when the current path segment starts with the given prefix.
Source
# File lib/roda/plugins/path_matchers.rb, line 46 def match_suffix(suffix) consume(self.class.cached_matcher([:suffix, suffix]){/([^\\\/]+)#{suffix}/}) end
Match when the current path segment ends with the given suffix.