Class: Sass::Supports::Negation

Inherits:
Condition show all
Defined in:
.ruby-sass/lib/sass/supports.rb

Overview

A negation condition (`not CONDITION`).

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

#initialize(condition) ⇒ Negation

Returns a new instance of Negation



98
99
100
# File '.ruby-sass/lib/sass/supports.rb', line 98

def initialize(condition)
  @condition = condition
end

Constructor Details

#initialize(condition) ⇒ Negation

Returns a new instance of Negation



98
99
100
# File '.ruby-sass/lib/sass/supports.rb', line 98

def initialize(condition)
  @condition = condition
end

Instance Attribute Details

#conditionSass::Supports::Condition

The condition being negated.



96
97
98
# File '.ruby-sass/lib/sass/supports.rb', line 96

def condition
  @condition
end

Instance Method Details

#deep_copyObject



114
115
116
117
118
# File '.ruby-sass/lib/sass/supports.rb', line 114

def deep_copy
  copy = dup
  copy.condition = condition.deep_copy
  copy
end

#options=(options) ⇒ Object



120
121
122
# File '.ruby-sass/lib/sass/supports.rb', line 120

def options=(options)
  condition.options = options
end

#perform(env) ⇒ Object



102
103
104
# File '.ruby-sass/lib/sass/supports.rb', line 102

def perform(env)
  @condition.perform(env)
end

#to_cssObject



106
107
108
# File '.ruby-sass/lib/sass/supports.rb', line 106

def to_css
  "not #{parens @condition.to_css}"
end

#to_src(options) ⇒ Object



110
111
112
# File '.ruby-sass/lib/sass/supports.rb', line 110

def to_src(options)
  "not #{parens @condition.to_src(options)}"
end