Class: Sass::Tree::ExtendNode

Inherits:
Node
  • Object
show all
Defined in:
lib/sass/tree/extend_node.rb

Overview

A static node representing an @extend directive.

See Also:

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #filename, #has_children, #line, #options, #source_range

Instance Method Summary collapse

Methods inherited from Node

#<<, #==, #balance, #bubbles?, #css, #css_with_sourcemap, #deep_copy, #each, #inspect, #invisible?, #style, #to_sass, #to_scss

Constructor Details

#initialize(selector, optional, selector_source_range) ⇒ ExtendNode

Returns a new instance of ExtendNode.

Parameters:



36
37
38
39
40
41
# File 'lib/sass/tree/extend_node.rb', line 36

def initialize(selector, optional, selector_source_range)
  @selector = selector
  @optional = optional
  @selector_source_range = selector_source_range
  super()
end

Instance Attribute Details

#resolved_selectorSelector::CommaSequence

The parsed selector after interpolation has been resolved. Only set once Visitors::Perform has been run.



12
13
14
# File 'lib/sass/tree/extend_node.rb', line 12

def resolved_selector
  @resolved_selector
end

#selectorArray<String, Sass::Script::Tree::Node>

The CSS selector to extend, interspersed with Script::Tree::Nodes representing #{}-interpolation.

Returns:



18
19
20
# File 'lib/sass/tree/extend_node.rb', line 18

def selector
  @selector
end

#selector_source_rangeSass::Source::Range

The extended selector source range.

Returns:



23
24
25
# File 'lib/sass/tree/extend_node.rb', line 23

def selector_source_range
  @selector_source_range
end

Instance Method Details

#optional?Boolean

Whether the @extend is allowed to match no selectors or not.

Returns:

  • (Boolean)


28
# File 'lib/sass/tree/extend_node.rb', line 28

def optional?; @optional; end