Public Instance methods
preload_assets_link_header(*args)
Return a string suitable for a Link header for the given asset types/groups.
[show source]
# File lib/roda/plugins/assets_preloading.rb 67 def preload_assets_link_header(*args) 68 _preload_assets_array(args).map{|path, as| "<#{path}>;rel=preload;as=#{as}"}.join(",") 69 end
preload_assets_link_tags(*args)
Return a string of <link> tags for the given asset types/groups.
[show source]
# File lib/roda/plugins/assets_preloading.rb 61 def preload_assets_link_tags(*args) 62 _preload_assets_array(args).map{|path, as| "<link href=\"#{h(path)}\" rel=\"preload\" as=\"#{as}\">"}.join("\n") 63 end