Class: SassC::Rails::Importer::ERBExtension

Inherits:
Extension
  • Object
show all
Defined in:
lib/sassc/rails/importer.rb

Instance Attribute Summary

Attributes inherited from Extension

#postfix

Instance Method Summary collapse

Methods inherited from Extension

#initialize

Constructor Details

This class inherits a constructor from SassC::Rails::Importer::Extension

Instance Method Details

#import_for(full_path, parent_dir, options) ⇒ Object



68
69
70
71
72
# File 'lib/sassc/rails/importer.rb', line 68

def import_for(full_path, parent_dir, options)
  template = Tilt::ERBTemplate.new(full_path)
  parsed_erb = template.render(options[:sprockets][:context], {})
  SassC::Importer::Import.new(full_path, source: parsed_erb)
end