Class: Sass::Supports::Operator

Inherits:
Condition show all
Defined in:
/home/nweiz/code/sass-site/.sass/lib/sass/supports.rb

Overview

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

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Operator) initialize(left, right, op)

Returns a new instance of Operator



49
50
51
52
53
# File '/home/nweiz/code/sass-site/.sass/lib/sass/supports.rb', line 49

def initialize(left, right, op)
  @left = left
  @right = right
  @op = op
end

Instance Attribute Details

- (Sass::Supports::Condition) left

The left-hand condition.



37
38
39
# File '/home/nweiz/code/sass-site/.sass/lib/sass/supports.rb', line 37

def left
  @left
end

- (String) op

The operator ("and" or "or").

Returns:

  • (String)


47
48
49
# File '/home/nweiz/code/sass-site/.sass/lib/sass/supports.rb', line 47

def op
  @op
end

- (Sass::Supports::Condition) right

The right-hand condition.



42
43
44
# File '/home/nweiz/code/sass-site/.sass/lib/sass/supports.rb', line 42

def right
  @right
end

Instance Method Details

- deep_copy



68
69
70
71
72
73
# File '/home/nweiz/code/sass-site/.sass/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)



75
76
77
78
# File '/home/nweiz/code/sass-site/.sass/lib/sass/supports.rb', line 75

def options=(options)
  @left.options = options
  @right.options = options
end

- perform(env)



55
56
57
58
# File '/home/nweiz/code/sass-site/.sass/lib/sass/supports.rb', line 55

def perform(env)
  @left.perform(env)
  @right.perform(env)
end

- to_css



60
61
62
# File '/home/nweiz/code/sass-site/.sass/lib/sass/supports.rb', line 60

def to_css
  "#{parens @left, @left.to_css} #{op} #{parens @right, @right.to_css}"
end

- to_src(options)



64
65
66
# File '/home/nweiz/code/sass-site/.sass/lib/sass/supports.rb', line 64

def to_src(options)
  "#{parens @left, @left.to_src(options)} #{op} #{parens @right, @right.to_src(options)}"
end