class Sass::Tree::ImportNode
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.
Attributes
Sets the imported file.
The name of the imported file as it appears in the Sass document.
@return [String]
Public Class Methods
Source
# File lib/sass/tree/import_node.rb, line 16 def initialize(imported_filename) @imported_filename = imported_filename super(nil) end
@param imported_filename [String] The name of the imported file
Calls superclass method
Public Instance Methods
Source
# File lib/sass/tree/import_node.rb, line 34 def css_import? if @imported_filename =~ /\.css$/ @imported_filename elsif imported_file.is_a?(String) && imported_file =~ /\.css$/ imported_file end end
Returns whether or not this import should emit a CSS @import declaration
@return [Boolean] Whether or not this is a simple CSS @import declaration.
Source
# File lib/sass/tree/import_node.rb, line 27 def imported_file @imported_file ||= import end
Returns the imported file.
@return [Sass::Engine] @raise [Sass::SyntaxError] If no file could be found to import.