Module: Roda::RodaPlugins::Assets::RequestMethods

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

Instance Method Summary collapse

Instance Method Details

#assetsObject

Render the matching asset if this is a GET request for a supported asset.



809
810
811
812
813
814
815
816
817
818
# File 'lib/roda/plugins/assets.rb', line 809

def assets
  if is_get?
    self.class.assets_matchers.each do |type, matcher|
      is matcher do |file|
        scope.render_asset(file, type)
      end
    end
    nil
  end
end