Class: CSS::Selectors::Matcher::Context
- Inherits:
-
Data
- Object
- Data
- 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
readonly
Returns the value of attribute classes.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Attribute Details
#classes ⇒ Object (readonly)
Returns the value of attribute classes
44 45 46 |
# File 'lib/css/selectors/matcher.rb', line 44 def classes @classes end |
#id ⇒ Object (readonly)
Returns the value of attribute id
44 45 46 |
# File 'lib/css/selectors/matcher.rb', line 44 def id @id end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag
44 45 46 |
# File 'lib/css/selectors/matcher.rb', line 44 def tag @tag end |