module Roda::RodaPlugins::Assets::RequestClassMethods

def assets_regexp(type)

for the asset types.
The regexp matcher to use for the given type. This handles any asset groups
def assets_regexp(type)
  o = roda_class.assets_opts
  if compiled = o[:compiled]
    assets = compiled.
      select{|k,_| k =~ /\A#{type}/}.
      map{|k, md| _asset_regexp(type, k, md)}
    return if assets.empty?
    /#{o[:"compiled_#{type}_prefix"]}(#{Regexp.union(assets)})/
  else
    return unless assets = o[type]
    assets = unnest_assets_hash(assets)
    ts = o[:timestamp_paths]
    /#{o[:"#{type}_prefix"]}#{"\\d+#{ts}" if ts}(#{Regexp.union(assets.uniq)})#{o[:"#{type}_suffix"]}/
  end
end