Class: Gammo::CSSSelector::AST::Selector::Attrib
- Inherits:
-
Object
- Object
- Gammo::CSSSelector::AST::Selector::Attrib
- Defined in:
- lib/gammo/css_selector/ast/selector/attrib_selector.rb
Direct Known Subclasses
DashMatch, Equal, Includes, PrefixMatch, SubstringMatch, SuffixMatch
Defined Under Namespace
Classes: DashMatch, Equal, Includes, PrefixMatch, SubstringMatch, SuffixMatch
Constant Summary
Constants included from Subclassify
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(key:, value:, namespace_prefix: nil) ⇒ Attrib
constructor
A new instance of Attrib.
- #match?(context) ⇒ Boolean
Constructor Details
#initialize(key:, value:, namespace_prefix: nil) ⇒ Attrib
Returns a new instance of Attrib.
10 11 12 13 14 |
# File 'lib/gammo/css_selector/ast/selector/attrib_selector.rb', line 10 def initialize(key:, value:, namespace_prefix: nil) @key = key @value = value @namespace_prefix = namespace_prefix end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
6 7 8 |
# File 'lib/gammo/css_selector/ast/selector/attrib_selector.rb', line 6 def value @value end |
Instance Method Details
#match?(context) ⇒ Boolean
16 17 18 |
# File 'lib/gammo/css_selector/ast/selector/attrib_selector.rb', line 16 def match?(context) raise NotImplemented, "#match? must be implemented by sub class" end |