Class: Sass::Tree::ExtendNode

Inherits:
Node
  • Object
show all
Defined in:
/home/nweiz/code/sass-site/.sass/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

- (ExtendNode) initialize(selector, optional, selector_source_range)

Returns a new instance of ExtendNode

Parameters:



36
37
38
39
40
41
# File '/home/nweiz/code/sass-site/.sass/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

- (Selector::CommaSequence) resolved_selector

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



12
13
14
# File '/home/nweiz/code/sass-site/.sass/lib/sass/tree/extend_node.rb', line 12

def resolved_selector
  @resolved_selector
end

- (Array<String, Sass::Script::Tree::Node>) selector

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

Returns:



18
19
20
# File '/home/nweiz/code/sass-site/.sass/lib/sass/tree/extend_node.rb', line 18

def selector
  @selector
end

- (Sass::Source::Range) selector_source_range

The extended selector source range.

Returns:



23
24
25
# File '/home/nweiz/code/sass-site/.sass/lib/sass/tree/extend_node.rb', line 23

def selector_source_range
  @selector_source_range
end

Instance Method Details

- (Boolean) optional?

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

Returns:

  • (Boolean)


28
# File '/home/nweiz/code/sass-site/.sass/lib/sass/tree/extend_node.rb', line 28

def optional?; @optional; end