Class: Sass::Tree::DirectiveNode

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

Overview

A static node representing an unproccessed Sass @-directive. Directives known to Sass, like @for and @debug, are handled by their own nodes; only CSS directives like @media and @font-face become DirectiveNodes.

@import and @charset are special cases; they become ImportNodes and CharsetNodes, respectively.

See Also:

Direct Known Subclasses

MediaNode

Instance Attribute Summary collapse

Attributes inherited from Node

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

Instance Method Summary collapse

Methods inherited from Node

#<<, #==, #balance, #deep_copy, #do_extend, #each, #invisible?, #style, #to_s, #to_sass, #to_scss

Constructor Details

#initialize(value) ⇒ DirectiveNode

Returns a new instance of DirectiveNode.

Parameters:

  • value (String)

    See #value



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

def initialize(value)
  @value = value
  super()
end

Instance Attribute Details

#valueString

The text of the directive, @ and all.

Returns:

  • (String)


15
16
17
# File 'lib/sass/tree/directive_node.rb', line 15

def value
  @value
end