Class: Sass::Supports::Negation
- Inherits:
- Condition
- Object
- Condition
- Sass::Supports::Negation
- Defined in:
- /Users/ceppstei/Projects/sass-lang/.sass/lib/sass/supports.rb
Overview
A negation condition (not CONDITION
).
Instance Attribute Summary (collapse)
- - (Sass::Supports::Condition) condition
The condition being negated.
Instance Method Summary (collapse)
- - deep_copy
- - (Negation) initialize(condition) constructor
A new instance of Negation.
- - options=(options)
- - perform(env)
- - to_css
- - to_src(options)
Constructor Details
- (Negation) initialize(condition)
Returns a new instance of Negation
98 99 100 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/supports.rb', line 98
def initialize(condition)
@condition = condition
end |
Instance Attribute Details
- (Sass::Supports::Condition) condition
The condition being negated.
96 97 98 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/supports.rb', line 96
def condition
@condition
end |
Instance Method Details
- deep_copy
114 115 116 117 118 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/supports.rb', line 114
def deep_copy
copy = dup
copy.condition = condition.deep_copy
copy
end |
- options=(options)
120 121 122 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/supports.rb', line 120
def options=(options)
condition.options = options
end |
- perform(env)
102 103 104 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/supports.rb', line 102
def perform(env)
@condition.perform(env)
end |
- to_css
106 107 108 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/supports.rb', line 106
def to_css
"not #{parens @condition.to_css}"
end |
- to_src(options)
110 111 112 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/supports.rb', line 110
def to_src(options)
"not #{parens @condition.to_src(options)}"
end |