Class: Sass::Tree::MixinNode
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.
Instance Attribute Summary collapse
-
#args ⇒ Array<Script::Tree::Node>
The arguments to the mixin.
-
#keywords ⇒ Sass::Util::NormalizedMap<Script::Tree::Node>
A hash from keyword argument names to values.
-
#kwarg_splat ⇒ Node?
The second splat argument for this mixin, if one exists.
-
#name ⇒ String
readonly
The name of the mixin.
-
#splat ⇒ Node?
The first splat argument for this mixin, if one exists.
Attributes inherited from Node
#children, #filename, #has_children, #line, #options, #source_range
Instance Method Summary collapse
-
#initialize(name, args, keywords, splat, kwarg_splat) ⇒ MixinNode
constructor
A new instance of MixinNode.
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.
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
#args ⇒ Array<Script::Tree::Node>
The arguments to the mixin.
16 17 18 |
# File 'lib/sass/tree/mixin_node.rb', line 16
def args
@args
end
|
#keywords ⇒ Sass::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_splat ⇒ Node?
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.
36 37 38 |
# File 'lib/sass/tree/mixin_node.rb', line 36
def kwarg_splat
@kwarg_splat
end
|
#name ⇒ String (readonly)
The name of the mixin.
12 13 14 |
# File 'lib/sass/tree/mixin_node.rb', line 12
def name
@name
end
|
#splat ⇒ Node?
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.
28 29 30 |
# File 'lib/sass/tree/mixin_node.rb', line 28
def splat
@splat
end
|