Module: Sprockets::Export::MetadataInjector
- Extended by:
- MetadataInjector
- Included in:
- MetadataInjector
- Defined in:
- lib/sprockets/export/metadata_injector.rb
Instance Method Summary collapse
Instance Method Details
#call(input) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/sprockets/export/metadata_injector.rb', line 4 def call(input) data, environment, filename = *input.values_at(:data, :environment, :filename) if = Sprockets::Export::Store.get(environment, filename) open = "/* !START EXPORT #{} */" close = "/* !END EXPORT */" data = [open, data.chomp, close].join("\n") + "\n" end { data: data } end |