Class: Sass::Tree::MixinNode

Inherits:
Node
  • Object
show all
Defined in:
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

#initialize(name, args, keywords, splat, kwarg_splat) ⇒ MixinNode

Returns a new instance of MixinNode.

Parameters:



43
44
45
46
47
48
49
50
# File '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

#argsArray<Script::Tree::Node>

The arguments to the mixin.

Returns:



16
17
18
# File 'lib/sass/tree/mixin_node.rb', line 16

def args
  @args
end

#keywordsSass::Util::NormalizedMap<Script::Tree::Node>

A hash from keyword argument names to values.



20
21
22
# File 'lib/sass/tree/mixin_node.rb', line 20

def keywords
  @keywords
end

#kwarg_splatNode?

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 'lib/sass/tree/mixin_node.rb', line 36

def kwarg_splat
  @kwarg_splat
end

#nameString (readonly)

The name of the mixin.

Returns:

  • (String)


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

def name
  @name
end

#splatNode?

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 'lib/sass/tree/mixin_node.rb', line 28

def splat
  @splat
end