Class: Dommy::Internal::SelectorAST::PseudoClass
- Inherits:
-
Struct
- Object
- Struct
- Dommy::Internal::SelectorAST::PseudoClass
- Defined in:
- lib/dommy/internal/selector_ast.rb
Instance Attribute Summary collapse
-
#argument ⇒ Object
Returns the value of attribute argument.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#argument ⇒ Object
Returns the value of attribute argument
90 91 92 |
# File 'lib/dommy/internal/selector_ast.rb', line 90 def argument @argument end |
#name ⇒ Object
Returns the value of attribute name
90 91 92 |
# File 'lib/dommy/internal/selector_ast.rb', line 90 def name @name end |
Instance Method Details
#specificity ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/dommy/internal/selector_ast.rb', line 91 def specificity case name when "is", "not", "has" argument_specificity when "where" ZERO when "nth-child", "nth-last-child" CLASS + (argument&.of_selector_list&.specificity || ZERO) else CLASS end end |