# class Sass::Supports::Operator

An operator condition (e.g. `CONDITION1 and CONDITION2`).

### Attributes

left[RW]

The left-hand condition.

@return [Sass::Supports::Condition]

op[RW]

The operator (“and” or “or”).

@return [String]

right[RW]

The right-hand condition.

@return [Sass::Supports::Condition]

### Public Class Methods

new(left, right, op) click to toggle source

    # File lib/sass/supports.rb, line 49
    def initialize(left, right, op)
      @left = left
      @right = right
      @op = op
    end

### Public Instance Methods

deep_copy() click to toggle source

    # File lib/sass/supports.rb, line 68
    def deep_copy
      copy = dup
      copy.left = @left.deep_copy
      copy.right = @right.deep_copy
      copy
    end

options=(options) click to toggle source

    # File lib/sass/supports.rb, line 75
    def options=(options)
      @left.options = options
      @right.options = options
    end

perform(env) click to toggle source

    # File lib/sass/supports.rb, line 55
    def perform(env)
      @left.perform(env)
      @right.perform(env)
    end

to_css() click to toggle source

    # File lib/sass/supports.rb, line 60
    def to_css
      "#{parens @left, @left.to_css} #{op} #{parens @right, @right.to_css}"
    end

to_src(options) click to toggle source

    # File lib/sass/supports.rb, line 64
    def to_src(options)
      "#{parens @left, @left.to_src(options)} #{op} #{parens @right, @right.to_src(options)}"
    end

### Private Instance Methods

parens(condition, str) click to toggle source

    # File lib/sass/supports.rb, line 82
    def parens(condition, str)
      if condition.is_a?(Negation) || (condition.is_a?(Operator) && condition.op != op)
        return "(#{str})"
      else
        return str
      end
    end