Class: SassExtractor::Extractor
- Inherits:
-
Object
- Object
- SassExtractor::Extractor
- Defined in:
- lib/sass-extractor.rb
Instance Method Summary collapse
- #check_nesting ⇒ Object
- #compile ⇒ Object
- #get_rules(prefixes) ⇒ Object
-
#initialize(tree) ⇒ Extractor
constructor
A new instance of Extractor.
Constructor Details
#initialize(tree) ⇒ Extractor
Returns a new instance of Extractor.
21 22 23 24 |
# File 'lib/sass-extractor.rb', line 21 def initialize(tree) @tree = tree compile end |
Instance Method Details
#check_nesting ⇒ Object
38 39 40 |
# File 'lib/sass-extractor.rb', line 38 def check_nesting Sass::Tree::Visitors::CheckNesting.visit(@tree) end |
#compile ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/sass-extractor.rb', line 30 def compile check_nesting @tree = Sass::Tree::Visitors::Perform.visit(@tree) check_nesting @tree, extends = Sass::Tree::Visitors::Cssize.visit(@tree) @tree = @tree.do_extend(extends) unless extends.empty? end |