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:



436
437
438
439
# File 'lib/sass/selector.rb', line 436

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

Instance Attribute Details

#nameString (readonly)

The name of the pseudoclass.

Returns:

  • (String)


427
428
429
# File 'lib/sass/selector.rb', line 427

def name
  @name
end

#selectorSelector::Sequence (readonly)

The selector argument.

Returns:



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

def selector
  @selector
end

Instance Method Details

#specificity



447
448
449
# File 'lib/sass/selector.rb', line 447

def specificity
  SPECIFICITY_BASE
end

#to_a

See Also:

  • Selector#to_a


442
443
444
# File 'lib/sass/selector.rb', line 442

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