Module: Moxml::LazyNodeSet
- Defined in:
- lib/moxml/lazy_node_set.rb
Overview
Marker for an adapter's native node-set result that NodeSet can hold without materializing the natives. The leptris binding's NodeSet mints one Ruby wrapper per result node in #to_a — the whole 900-node result set is built even when the caller only asks .size or .first — so the adapter hands the native set through instead. Contract: responds to length, empty?, [], each, to_a (yielding natives).
Instance Method Summary collapse
Instance Method Details
#size ⇒ Object
12 13 14 |
# File 'lib/moxml/lazy_node_set.rb', line 12 def size length end |