Class: Sass::Tree::FileNode
Overview
A static node that wraps the Sass::Tree for an ‘@import`ed file. It doesn’t have a functional purpose other than to add the ‘@import`ed file to the backtrace if an error occurs.
Instance Attribute Summary
Attributes inherited from Node
#children, #filename, #line, #options
Instance Method Summary collapse
-
#initialize(filename) ⇒ FileNode
constructor
A new instance of FileNode.
- #invisible? ⇒ Boolean
-
#to_s(*args) ⇒ Object
Computes the CSS for the imported file.
Methods inherited from Node
#<<, #==, #last, #perform, #render, #style, #to_sass
Constructor Details
#initialize(filename) ⇒ FileNode
Returns a new instance of FileNode.
8 9 10 11 |
# File 'lib/sass/tree/file_node.rb', line 8 def initialize(filename) @filename = filename super() end |
Instance Method Details
#invisible? ⇒ Boolean
23 |
# File 'lib/sass/tree/file_node.rb', line 23 def invisible?; to_s.empty?; end |
#to_s(*args) ⇒ Object
Computes the CSS for the imported file.
16 17 18 19 20 21 |
# File 'lib/sass/tree/file_node.rb', line 16 def to_s(*args) @to_s ||= (style == :compressed ? super().strip : super()) rescue Sass::SyntaxError => e e.add_backtrace_entry(@filename) raise e end |