Module: Compass::ImportOnce::Engine
- Defined in:
- lib/compass/import-once/engine.rb
Overview
All sass engines will be extended with this module to manage the lifecycle around each
Instance Method Summary collapse
- #render ⇒ Object
- #render_with_sourcemap(sourcemap_uri) ⇒ Object
- #to_css ⇒ Object
- #with_import_scope(css_filename) ⇒ Object
Instance Method Details
#render ⇒ Object
15 16 17 18 19 |
# File 'lib/compass/import-once/engine.rb', line 15 def render with_import_scope([:css_filename]) do super end end |
#render_with_sourcemap(sourcemap_uri) ⇒ Object
21 22 23 24 25 |
# File 'lib/compass/import-once/engine.rb', line 21 def render_with_sourcemap(sourcemap_uri) with_import_scope([:css_filename]) do super end end |
#to_css ⇒ Object
9 10 11 12 13 |
# File 'lib/compass/import-once/engine.rb', line 9 def to_css with_import_scope([:css_filename]) do super end end |
#with_import_scope(css_filename) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/compass/import-once/engine.rb', line 27 def with_import_scope(css_filename) Compass::ImportOnce.import_tracker[css_filename] = Set.new yield ensure Compass::ImportOnce.import_tracker.delete(css_filename) end |