Class: Sass::Tree::FunctionNode

Inherits:
Node
  • Object
show all
Defined in:
lib/sass/tree/function_node.rb

Overview

A dynamic node representing a function definition.

See Also:

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #filename, #has_children, #line, #options

Instance Method Summary collapse

Methods inherited from Node

#<<, #==, #balance, #deep_copy, #do_extend, #each, #invisible?, #style, #to_s, #to_sass, #to_scss

Constructor Details

#initialize(name, args) ⇒ FunctionNode

Returns a new instance of FunctionNode.

Parameters:



20
21
22
23
24
# File 'lib/sass/tree/function_node.rb', line 20

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

Instance Attribute Details

#argsArray<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

Returns:



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

def args
  @args
end

#nameString (readonly)

The name of the function.

Returns:

  • (String)


9
10
11
# File 'lib/sass/tree/function_node.rb', line 9

def name
  @name
end