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.



722
723
724
725
726
727
728
729
730
731
# File 'lib/roda/plugins/assets.rb', line 722

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