Class: Sass::Supports::Negation

Inherits:
Condition show all
Defined in:
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 '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 'lib/sass/supports.rb', line 96

def condition
  @condition
end

Instance Method Details

#deep_copy



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

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

#options=(options)



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

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

#perform(env)



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

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

#to_css



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

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

#to_src(options)



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

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