Class: Sprockets::Exporters::FileExporter
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Base
|
|
Instance Chain:
self,
Base
|
|
Inherits: |
Sprockets::Exporters::Base
|
Defined in: | lib/sprockets/exporters/file_exporter.rb |
Overview
Writes a an asset file to disk
Class Method Summary
Instance Attribute Summary
Base
- Inherited
Instance Method Summary
Base
- Inherited
Constructor Details
This class inherits a constructor from Sprockets::Exporters::Base
Instance Method Details
#call
[ GitHub ]# File 'lib/sprockets/exporters/file_exporter.rb', line 17
def call write(target) do |file| file.write(asset.source) end end
#skip?(logger) ⇒ Boolean
# File 'lib/sprockets/exporters/file_exporter.rb', line 7
def skip?(logger) if ::File.exist?(target) logger.debug "Skipping #{ target }, already exists" true else logger.info "Writing #{ target }" false end end