Class: Sass::Tree::FunctionNode
- Defined in:
- lib/sass/tree/function_node.rb
Overview
A dynamic node representing a function definition.
Instance Attribute Summary collapse
-
#args ⇒ Array<Script::Node>
The arguments to the function.
-
#name ⇒ String
readonly
The name of the function.
-
#splat ⇒ Script::Node?
The splat argument for this function, if one exists.
Attributes inherited from Node
#children, #filename, #has_children, #line, #options
Instance Method Summary collapse
-
#initialize(name, args, splat) ⇒ FunctionNode
constructor
A new instance of FunctionNode.
Methods inherited from Node
#<<, #==, #balance, #bubbles?, #deep_copy, #each, #inspect, #invisible?, #style, #to_s, #to_sass, #to_scss
Constructor Details
#initialize(name, args, splat) ⇒ FunctionNode
Returns a new instance of FunctionNode.
26 27 28 29 30 31 |
# File 'lib/sass/tree/function_node.rb', line 26
def initialize(name, args, splat)
@name = name
@args = args
@splat = splat
super()
end
|
Instance Attribute Details
#args ⇒ Array<Script::Node>
The arguments to the function. Each element is a tuple containing the variable for argument and the parse tree for the default value of the argument
16 17 18 |
# File 'lib/sass/tree/function_node.rb', line 16
def args
@args
end
|
#name ⇒ String (readonly)
The name of the function.
9 10 11 |
# File 'lib/sass/tree/function_node.rb', line 9
def name
@name
end
|
#splat ⇒ Script::Node?
The splat argument for this function, if one exists.
21 22 23 |
# File 'lib/sass/tree/function_node.rb', line 21
def splat
@splat
end
|