Class: Sass::Importers::DeprecatedPath
- Inherits:
-
Filesystem
- Object
- Base
- Filesystem
- Sass::Importers::DeprecatedPath
- Defined in:
- .ruby-sass/lib/sass/importers/deprecated_path.rb
Overview
This importer emits a deprecation warning the first time it is used to import a file. It is used to deprecate the current working directory from the list of automatic sass load paths.
Constant Summary
Instance Attribute Summary
Attributes inherited from Filesystem
Instance Method Summary (collapse)
- #directories_to_watch ⇒ Object
- #find(*args) ⇒ Object
-
#initialize(root) ⇒ DeprecatedPath
constructor
A new instance of DeprecatedPath.
- #to_s ⇒ Object
Methods inherited from Filesystem
#eql?, #find_relative, #hash, #key, #mtime, #public_url, #watched_file?
Methods inherited from Base
#find_relative, #key, #mtime, #public_url, #watched_file?
Constructor Details
#initialize(root) ⇒ DeprecatedPath
Returns a new instance of DeprecatedPath
8 9 10 11 12 |
# File '.ruby-sass/lib/sass/importers/deprecated_path.rb', line 8 def initialize(root) @specified_root = root @warning_given = false super end |
Constructor Details
#initialize(root) ⇒ DeprecatedPath
Returns a new instance of DeprecatedPath
8 9 10 11 12 |
# File '.ruby-sass/lib/sass/importers/deprecated_path.rb', line 8 def initialize(root) @specified_root = root @warning_given = false super end |
Instance Method Details
#directories_to_watch ⇒ Object
25 26 27 28 29 |
# File '.ruby-sass/lib/sass/importers/deprecated_path.rb', line 25 def directories_to_watch # The current working directory was not watched in Sass 3.2, # so we continue not to watch it while it's deprecated. [] end |
#find(*args) ⇒ Object
15 16 17 18 19 20 21 22 |
# File '.ruby-sass/lib/sass/importers/deprecated_path.rb', line 15 def find(*args) found = super if found && !@warning_given @warning_given = true Sass::Util.sass_warn deprecation_warning end found end |
#to_s ⇒ Object
32 33 34 |
# File '.ruby-sass/lib/sass/importers/deprecated_path.rb', line 32 def to_s "#{@root} (DEPRECATED)" end |