Module: Compass::ImportOnce::Importer
- Defined in:
- lib/compass/import-once/importer.rb
Overview
Any importer object that is extended with this module will get the import once behavior.
Instance Method Summary collapse
- #find(uri, options, *args) ⇒ Object
- #find_relative(uri, base, options, *args) ⇒ Object
- #key(uri, options, *args) ⇒ Object
- #mtime(uri, options, *args) ⇒ Object
Instance Method Details
#find(uri, options, *args) ⇒ Object
10 11 12 13 |
# File 'lib/compass/import-once/importer.rb', line 10 def find(uri, , *args) uri, force_import = handle_force_import(uri) maybe_replace_with_dummy_engine(super(uri, , *args), , force_import) end |
#find_relative(uri, base, options, *args) ⇒ Object
5 6 7 8 |
# File 'lib/compass/import-once/importer.rb', line 5 def find_relative(uri, base, , *args) uri, force_import = handle_force_import(uri) maybe_replace_with_dummy_engine(super(uri, base, , *args), , force_import) end |
#key(uri, options, *args) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/compass/import-once/importer.rb', line 15 def key(uri, , *args) if uri =~ /^\(NOT IMPORTED\) (.*)$/ ["(import-once)", $1] else super end end |
#mtime(uri, options, *args) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/compass/import-once/importer.rb', line 23 def mtime(uri, , *args) if uri =~ /^\(NOT IMPORTED\) (.*)$/ File.mtime($1) else super end end |