Module: Roda::RodaPlugins::Assets::RequestClassMethods

Defined in:
lib/roda/plugins/assets.rb

Instance Method Summary collapse

Instance Method Details

#assets_optsObject

Shortcut for roda class asset opts



247
248
249
# File 'lib/roda/plugins/assets.rb', line 247

def assets_opts
  roda_class.assets_opts
end

#assets_route_regexObject

The regex for the assets route



252
253
254
255
256
257
258
# File 'lib/roda/plugins/assets.rb', line 252

def assets_route_regex
  Regexp.new(
    assets_opts[:route] + '/' +
    "(#{assets_opts[:"css_folder"]}|#{assets_opts[:"js_folder"]})" +
    '/(.*)(?:\.(css|js)|http.*)$'
  )
end