class Sass::Script::UnaryOperation

def _perform(environment)

Raises:
  • (Sass::SyntaxError) - if the operation is undefined for the operand

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

Parameters:
  • environment (Sass::Environment) -- The environment in which to evaluate the SassScript
def _perform(environment)
  operator = "unary_#{@operator}"
  literal = @operand.perform(environment)
  literal.send(operator)
rescue NoMethodError => e
  raise e unless e.name.to_s == operator.to_s
  raise Sass::SyntaxError.new("Undefined unary operation: \"#{@operator} #{literal}\".")
end