Class: Flatrack::Sass::Importer
- Inherits:
-
Sass::Importers::Base
- Object
- Sass::Importers::Base
- Flatrack::Sass::Importer
- Defined in:
- lib/flatrack/sass/importer.rb
Constant Summary collapse
- GLOB =
/\*|\[.+\]/
Instance Method Summary collapse
- #find(path, options) ⇒ Object
- #find_relative(path, base_path, options) ⇒ Object
- #key(path, options) ⇒ Object
- #mtime(path, options) ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#find(path, options) ⇒ Object
19 20 21 |
# File 'lib/flatrack/sass/importer.rb', line 19 def find(path, ) engine_from_path(path, nil, ) end |
#find_relative(path, base_path, options) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/flatrack/sass/importer.rb', line 10 def find_relative(path, base_path, ) if path =~ GLOB engine_from_glob(path, base_path, ) else engine_from_path(path, base_path, ) end end |
#key(path, options) ⇒ Object
33 34 35 36 |
# File 'lib/flatrack/sass/importer.rb', line 33 def key(path, ) path = Pathname.new(path) ["#{self.class.name}:#{path.dirname.}", path.basename] end |
#mtime(path, options) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/flatrack/sass/importer.rb', line 24 def mtime(path, ) if pathname = resolve(path) pathname.mtime end rescue Errno::ENOENT nil end |
#to_s ⇒ Object
39 40 41 |
# File 'lib/flatrack/sass/importer.rb', line 39 def to_s "#{self.class.name}:#{context.pathname}" end |