Skip to content
Szikszai Gusztáv edited this page Apr 5, 2015 · 3 revisions

The class like the native NodeList is the DOM::NodeList (documentation). The native NodeList has some issues namely it doesn't behave like an Array, our version is different in this regard because it is an enumerable, so you can use each, map, etc... on it.

DOM::Document.body.find_all('p').map(&:text).join '\n'
Clone this wiki locally