Class: Sass::Selector::Negation

Inherits:
Simple
  • Object
show all
Defined in:
lib/sass/selector.rb

Overview

A negation pseudoclass selector (e.g. :not(.foo)).

Instance Attribute Summary collapse

Attributes inherited from Simple

#filename, #line

Instance Method Summary collapse

Methods inherited from Simple

#eql?, #hash, #inspect, #unify, #unify_namespaces

Constructor Details

#initialize(selector) ⇒ Negation

Returns a new instance of Negation.

Parameters:



343
344
345
# File 'lib/sass/selector.rb', line 343

def initialize(selector)
  @selector = selector
end

Instance Attribute Details

#selectorSelector (readonly)

The selector to negate.

Returns:



340
341
342
# File 'lib/sass/selector.rb', line 340

def selector
  @selector
end

Instance Method Details

#to_a

See Also:

  • Selector#to_a


348
349
350
# File 'lib/sass/selector.rb', line 348

def to_a
  [":not("] + @selector.to_a + [")"]
end