class Sass::Script::Funcall

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

def initialize(name, args)

Parameters:
  • name (Array) -- See \{#args}
  • name (String) -- See \{#name}
def initialize(name, args)
  @name = name
  @args = args
end

def inspect

Returns:
  • (String) - A string representation of the function call
def inspect
  "#{name}(#{args.map {|a| a.inspect}.join(', ')})"
end

def perform(environment)

Raises:
  • (Sass::SyntaxError) - if the function call raises an ArgumentError

Returns:
  • (Literal) - The SassScript object that is the value of the function call

Parameters:
  • environment (Sass::Environment) -- The environment in which to evaluate the SassScript
def perform(environment)
  args = self.args.map {|a| a.perform(environment)}
  unless Haml::Util.has?(:public_instance_method, Functions, name) && name !~ /^__/
    return Script::String.new("#{name}(#{args.map {|a| a.perform(environment)}.join(', ')})")
  end
  return Functions::EvaluationContext.new(environment.options).send(name, *args)
rescue ArgumentError => e
  raise e unless e.backtrace.first =~ /:in `(block in )?(#{name}|perform)'$/
  raise Sass::SyntaxError.new("#{e.message} for `#{name}'")
end