Class: Sass::Tree::MixinDefNode

Inherits:
Node
  • Object
show all
Defined in:
/home/nweiz/code/sass-site/.sass/lib/sass/tree/mixin_def_node.rb

Overview

A dynamic node representing a mixin definition.

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

- (MixinDefNode) initialize(name, args, splat)

Returns a new instance of MixinDefNode

Parameters:



30
31
32
33
34
35
# File '/home/nweiz/code/sass-site/.sass/lib/sass/tree/mixin_def_node.rb', line 30

def initialize(name, args, splat)
  @name = name
  @args = args
  @splat = splat
  super()
end

Instance Attribute Details

- (Array<(Script::Tree::Node, Script::Tree::Node)>) args

The arguments for the mixin. Each element is a tuple containing the variable for argument and the parse tree for the default value of the argument.

Returns:



16
17
18
# File '/home/nweiz/code/sass-site/.sass/lib/sass/tree/mixin_def_node.rb', line 16

def args
  @args
end

- (Boolean) has_content

Whether the mixin uses @content. Set during the nesting check phase.

Returns:

  • (Boolean)


25
26
27
# File '/home/nweiz/code/sass-site/.sass/lib/sass/tree/mixin_def_node.rb', line 25

def has_content
  @has_content
end

- (String) name (readonly)

The mixin name.

Returns:

  • (String)


9
10
11
# File '/home/nweiz/code/sass-site/.sass/lib/sass/tree/mixin_def_node.rb', line 9

def name
  @name
end

- (Script::Tree::Node?) splat

The splat argument for this mixin, if one exists.

Returns:



21
22
23
# File '/home/nweiz/code/sass-site/.sass/lib/sass/tree/mixin_def_node.rb', line 21

def splat
  @splat
end