Class: Sass::Supports::Operator
- Inherits:
-
Condition
- Object
- Condition
- Sass::Supports::Operator
- Defined in:
- .ruby-sass/lib/sass/supports.rb
Overview
An operator condition (e.g. `CONDITION1 and CONDITION2`).
Instance Attribute Summary (collapse)
-
#left ⇒ Sass::Supports::Condition
The left-hand condition.
-
#op ⇒ String
The operator (“and” or “or”).
-
#right ⇒ Sass::Supports::Condition
The right-hand condition.
Instance Method Summary (collapse)
- #deep_copy ⇒ Object
-
#initialize(left, right, op) ⇒ Operator
constructor
A new instance of Operator.
- #options=(options) ⇒ Object
- #perform(env) ⇒ Object
- #to_css ⇒ Object
- #to_src(options) ⇒ Object
Constructor Details
#initialize(left, right, op) ⇒ Operator
Returns a new instance of Operator
49 50 51 52 53 |
# File '.ruby-sass/lib/sass/supports.rb', line 49 def initialize(left, right, op) @left = left @right = right @op = op end |
Constructor Details
#initialize(left, right, op) ⇒ Operator
Returns a new instance of Operator
49 50 51 52 53 |
# File '.ruby-sass/lib/sass/supports.rb', line 49 def initialize(left, right, op) @left = left @right = right @op = op end |
Instance Attribute Details
#left ⇒ Sass::Supports::Condition
The left-hand condition.
37 38 39 |
# File '.ruby-sass/lib/sass/supports.rb', line 37 def left @left end |
#op ⇒ String
The operator (“and” or “or”).
47 48 49 |
# File '.ruby-sass/lib/sass/supports.rb', line 47 def op @op end |
#right ⇒ Sass::Supports::Condition
The right-hand condition.
42 43 44 |
# File '.ruby-sass/lib/sass/supports.rb', line 42 def right @right end |
Instance Method Details
#deep_copy ⇒ Object
68 69 70 71 72 73 |
# File '.ruby-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) ⇒ Object
75 76 77 78 |
# File '.ruby-sass/lib/sass/supports.rb', line 75 def () @left. = @right. = end |
#perform(env) ⇒ Object
55 56 57 58 |
# File '.ruby-sass/lib/sass/supports.rb', line 55 def perform(env) @left.perform(env) @right.perform(env) end |
#to_css ⇒ Object
60 61 62 |
# File '.ruby-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) ⇒ Object
64 65 66 |
# File '.ruby-sass/lib/sass/supports.rb', line 64 def to_src() "#{parens @left, @left.to_src()} #{op} #{parens @right, @right.to_src()}" end |