Class Sass::Script::Operation
In: lib/sass/script/operation.rb
Parent: Node

A SassScript parse node representing a binary operation, such as `$a + $b` or `"foo" + 1`.

Methods

_perform   children   inspect   new   to_sass  

Attributes

operand1  [R] 
operand2  [R] 
operator  [R] 

Public Class methods

@param operand1 [Script::Node] The parse-tree node

  for the right-hand side of the operator

@param operand2 [Script::Node] The parse-tree node

  for the left-hand side of the operator

@param operator [Symbol] The operator to perform.

  This should be one of the binary operator names in {Lexer::OPERATORS}

Public Instance methods

Returns the operands for this operation.

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

@return [String] A human-readable s-expression representation of the operation

Protected Instance methods

Evaluates the operation.

@param environment [Sass::Environment] The environment in which to evaluate the SassScript @return [Literal] The SassScript object that is the value of the operation @raise [Sass::SyntaxError] if the operation is undefined for the operands

[Validate]