Class: Sass::Tree::MixinNode

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

Overview

A static node representing a mixin include. When in a static tree, the sole purpose is to wrap exceptions to add the mixin to the backtrace.

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

- (MixinNode) initialize(name, args, keywords, splat, kwarg_splat)

Returns a new instance of MixinNode

Parameters:



43
44
45
46
47
48
49
50
# File '/home/nweiz/code/sass-site/.sass/lib/sass/tree/mixin_node.rb', line 43

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

Instance Attribute Details

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

The arguments to the mixin.

Returns:



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

def args
  @args
end

- (Sass::Util::NormalizedMap<Script::Tree::Node>) keywords

A hash from keyword argument names to values.



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

def keywords
  @keywords
end

- (Node?) kwarg_splat

The second splat argument for this mixin, if one exists.

If this exists, it's always a map of keyword arguments, and #splat is always either a list or an arglist.

Returns:



36
37
38
# File '/home/nweiz/code/sass-site/.sass/lib/sass/tree/mixin_node.rb', line 36

def kwarg_splat
  @kwarg_splat
end

- (String) name (readonly)

The name of the mixin.

Returns:

  • (String)


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

def name
  @name
end

- (Node?) splat

The first splat argument for this mixin, if one exists.

This could be a list of positional arguments, a map of keyword arguments, or an arglist containing both.

Returns:



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

def splat
  @splat
end