class Sass::Script::Operation
def _perform(environment)
-
(Sass::SyntaxError)
- if the operation is undefined for the operands
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) literal1 = @operand1.perform(environment) literal2 = @operand2.perform(environment) begin opts(literal1.send(@operator, literal2)) rescue NoMethodError => e raise e unless e.name.to_s == @operator.to_s raise Sass::SyntaxError.new("Undefined operation: \"#{literal1} #{@operator} #{literal2}\".") end end