Class Sass::Script::Tree::Funcall
In: lib/sass/script/tree/funcall.rb
Parent: Node

A SassScript parse node representing a function call.

A function call either calls one of the functions in {Sass::Script::Functions}, or if no function with the given name exists it returns a string representation of the function call.

Methods

_perform   children   deep_copy   inspect   new   to_literal   to_sass   to_value  

Attributes

args  [R]  The arguments to the function.

@return [Array<Node>]

keywords  [R]  The keyword arguments to the function.

@return [Sass::Util::NormalizedMap<Node>]

kwarg_splat  [RW]  The second splat argument for this function, if one exists.

If this exists, it‘s always a map of keyword arguments, and \{splat} is always either a list or an arglist.

@return [Node?]

name  [R]  The name of the function.

@return [String]

splat  [RW]  The first splat argument for this function, if one exists.

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

@return [Node?]

Public Class methods

@param name [String] See \{name} @param args [Array<Node>] See \{args} @param keywords [Sass::Util::NormalizedMap<Node>] See \{keywords} @param splat [Node] See \{splat} @param kwarg_splat [Node] See \{kwarg_splat}

Public Instance methods

Returns the arguments to the function.

@return [Array<Node>] @see Node#children

@return [String] A string representation of the function call

Protected Instance methods

Evaluates the function call.

@param environment [Sass::Environment] The environment in which to evaluate the SassScript @return [Sass::Script::Value] The SassScript object that is the value of the function call @raise [Sass::SyntaxError] if the function call raises an ArgumentError

Compass historically overrode this before it changed name to {Funcall#to_value}. We should get rid of it in the future.

This method is factored out from `_perform` so that compass can override it with a cross-browser implementation for functions that require vendor prefixes in the generated css.

[Validate]