Class: Gammo::CSSSelector::AST::Selector::Pseudo::Enabled
- Inherits:
-
Gammo::CSSSelector::AST::Selector::Pseudo
- Object
- Gammo::CSSSelector::AST::Selector::Pseudo
- Gammo::CSSSelector::AST::Selector::Pseudo::Enabled
- Defined in:
- lib/gammo/css_selector/ast/selector/pseudo_class.rb
Constant Summary
Constants included from Subclassify
Instance Attribute Summary
Attributes inherited from Gammo::CSSSelector::AST::Selector::Pseudo
Instance Method Summary collapse
Methods inherited from Gammo::CSSSelector::AST::Selector::Pseudo
Constructor Details
This class inherits a constructor from Gammo::CSSSelector::AST::Selector::Pseudo
Instance Method Details
#match?(context) ⇒ Boolean
21 22 23 24 25 26 |
# File 'lib/gammo/css_selector/ast/selector/pseudo_class.rb', line 21 def match?(context) # Return true if attributes do not have the key, or value is not # nil or the same with the key. !context.node.attributes.key?(:disabled) || (!context.node.attributes[:disabled].nil? && context.node.attributes[:disabled] != 'disabled') end |