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, #unify, #unify_namespaces

Constructor Details

#initialize(name, selector) ⇒ SelectorPseudoClass

Returns a new instance of SelectorPseudoClass.

Parameters:



350
351
352
353
# File 'lib/sass/selector.rb', line 350

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

Instance Attribute Details

#nameString (readonly)

The name of the pseudoclass.

Returns:

  • (String)


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

def name
  @name
end

#selectorSelector::Sequence (readonly)

The selector argument.

Returns:



346
347
348
# File 'lib/sass/selector.rb', line 346

def selector
  @selector
end

Instance Method Details

#to_a

See Also:

  • Selector#to_a


356
357
358
# File 'lib/sass/selector.rb', line 356

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