For instance, parsing a Google search results page:
(doc/"a.l").each do |link| label = link.inner_text href = link.attributes['href'] ...