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