class Pannier::Tags
Attributes
app[R]
Public Class Methods
new(app)
click to toggle source
# File lib/pannier/mounted/tags.rb, line 8 def initialize(app) @app = app end
Public Instance Methods
write(package_name, attrs = {})
click to toggle source
# File lib/pannier/mounted/tags.rb, line 12 def write(package_name, attrs = {}) template_klass = attrs.delete(:as) template = template_klass.new to_write = @app[package_name].output_assets.map do |asset| template.call(asset.serve_from(@app), attrs) end to_write.join("\n") end