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



100
101
102
# File 'lib/sass/supports.rb', line 100

def initialize(condition)
  @condition = condition
end

Instance Attribute Details

#conditionSass::Supports::Condition

The condition being negated.



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

def condition
  @condition
end

Instance Method Details

#deep_copy



116
117
118
119
120
# File 'lib/sass/supports.rb', line 116

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

#options=(options)



122
123
124
# File 'lib/sass/supports.rb', line 122

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

#perform(env)



104
105
106
# File 'lib/sass/supports.rb', line 104

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

#to_css



108
109
110
# File 'lib/sass/supports.rb', line 108

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

#to_src(options)



112
113
114
# File 'lib/sass/supports.rb', line 112

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