Class: Sass::Selector::SelectorPseudoClass
- 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
-
#name ⇒ String
readonly
The name of the pseudoclass.
-
#selector ⇒ Selector::Sequence
readonly
The selector argument.
Attributes inherited from Simple
Instance Method Summary collapse
-
#initialize(name, selector) ⇒ SelectorPseudoClass
constructor
A new instance of SelectorPseudoClass.
- #specificity
- #to_a
Methods inherited from Simple
#eql?, #hash, #inspect, #to_s, #unify, #unify_namespaces
Constructor Details
#initialize(name, selector) ⇒ SelectorPseudoClass
Returns a new instance of SelectorPseudoClass.
436 437 438 439 |
# File 'lib/sass/selector.rb', line 436
def initialize(name, selector)
@name = name
@selector = selector
end
|
Instance Attribute Details
#name ⇒ String (readonly)
The name of the pseudoclass.
427 428 429 |
# File 'lib/sass/selector.rb', line 427
def name
@name
end
|
#selector ⇒ Selector::Sequence (readonly)
The selector argument.
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
442 443 444 |
# File 'lib/sass/selector.rb', line 442
def to_a
[":", @name, "("] + @selector.to_a + [")"]
end
|