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 do |k, md|
      "#{k.sub(/\A#{type}/, '')}.#{md}.#{type}"
    end
    /#{o[:"compiled_#{type}_prefix"]}(#{Regexp.union(assets)})/
  else
    assets = unnest_assets_hash(o[type])
    /#{o[:"#{type}_prefix"]}#{"\\d+\/" if o[:timestamp_paths]}(#{Regexp.union(assets.uniq)})#{o[:"#{type}_suffix"]}/
  end
end