Class: CSS::Selectors::Matcher::Context
- Inherits:
-
Struct
- Object
- Struct
- CSS::Selectors::Matcher::Context
- Defined in:
- lib/css/selectors/matcher.rb
Overview
Per-element cache used to avoid recomputing tag / id / class set for every selector in a hot loop (e.g. ‘Cascade#resolve` against hundreds of rules). Keyed by `Object#object_id`; only valid for the duration of a single matcher invocation.
Instance Attribute Summary collapse
-
#classes ⇒ Object
Returns the value of attribute classes.
-
#id ⇒ Object
Returns the value of attribute id.
-
#tag ⇒ Object
Returns the value of attribute tag.
Instance Attribute Details
#classes ⇒ Object
Returns the value of attribute classes
33 34 35 |
# File 'lib/css/selectors/matcher.rb', line 33 def classes @classes end |
#id ⇒ Object
Returns the value of attribute id
33 34 35 |
# File 'lib/css/selectors/matcher.rb', line 33 def id @id end |
#tag ⇒ Object
Returns the value of attribute tag
33 34 35 |
# File 'lib/css/selectors/matcher.rb', line 33 def tag @tag end |