Class: Sass::Selector::SelectorPseudoClass

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

Overview

A pseudoclass selector whose argument is itself a selector (e.g. :not(.foo) or :-moz-all(.foo, .bar)).

Instance Attribute Summary collapse

Attributes inherited from Simple

#filename, #line

Instance Method Summary collapse

Methods inherited from Simple

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

Constructor Details

#initialize(name, selector) ⇒ SelectorPseudoClass

Returns a new instance of SelectorPseudoClass.

Parameters:



433
434
435
436
# File 'lib/sass/selector.rb', line 433

def initialize(name, selector)
  @name = name
  @selector = selector
end

Instance Attribute Details

#nameString (readonly)

The name of the pseudoclass.

Returns:

  • (String)


424
425
426
# File 'lib/sass/selector.rb', line 424

def name
  @name
end

#selectorSelector::Sequence (readonly)

The selector argument.

Returns:



429
430
431
# File 'lib/sass/selector.rb', line 429

def selector
  @selector
end

Instance Method Details

#specificity



444
445
446
# File 'lib/sass/selector.rb', line 444

def specificity
  SPECIFICITY_BASE
end

#to_a

See Also:

  • Selector#to_a


439
440
441
# File 'lib/sass/selector.rb', line 439

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