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.
- #to_a
Methods inherited from Simple
#eql?, #hash, #inspect, #unify, #unify_namespaces
Constructor Details
#initialize(name, selector) ⇒ SelectorPseudoClass
Returns a new instance of SelectorPseudoClass.
350 351 352 353 |
# File 'lib/sass/selector.rb', line 350
def initialize(name, selector)
@name = name
@selector = selector
end
|
Instance Attribute Details
#name ⇒ String (readonly)
The name of the pseudoclass.
341 342 343 |
# File 'lib/sass/selector.rb', line 341
def name
@name
end
|
#selector ⇒ Selector::Sequence (readonly)
The selector argument.
346 347 348 |
# File 'lib/sass/selector.rb', line 346
def selector
@selector
end
|
Instance Method Details
#to_a
356 357 358 |
# File 'lib/sass/selector.rb', line 356
def to_a
[":", @name, "("] + @selector.to_a + [")"]
end
|