Class: Scrapetor::Native::DocumentWrapper::LazyIds
- Inherits:
-
Struct
- Object
- Struct
- Scrapetor::Native::DocumentWrapper::LazyIds
- Defined in:
- lib/scrapetor/native_dom.rb
Overview
‘lazy_css` is the fast path that Document#css uses: it returns raw ids when the native engine can handle the whole selector, so the Element-wrap happens once-per-iteration instead of once-per-result. Falls back to the eager `css` when native can’t handle the selector (kind, fallback dom, etc.).
Returns a ‘LazyIds` struct OR an Array of strings (for ::text/::attr) OR an Array of Element wrappers (when the selector needs the Dom fallback).
Instance Attribute Summary collapse
-
#ids ⇒ Object
Returns the value of attribute ids.
-
#native ⇒ Object
Returns the value of attribute native.
-
#wrapper ⇒ Object
Returns the value of attribute wrapper.
Instance Attribute Details
#ids ⇒ Object
Returns the value of attribute ids
1011 1012 1013 |
# File 'lib/scrapetor/native_dom.rb', line 1011 def ids @ids end |
#native ⇒ Object
Returns the value of attribute native
1011 1012 1013 |
# File 'lib/scrapetor/native_dom.rb', line 1011 def native @native end |
#wrapper ⇒ Object
Returns the value of attribute wrapper
1011 1012 1013 |
# File 'lib/scrapetor/native_dom.rb', line 1011 def wrapper @wrapper end |