Module: Nokogiri::More::NodeChildrenGroups
- Defined in:
- lib/nokogiri/more.rb
Instance Method Summary collapse
Instance Method Details
#children_groups(*selectors) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/nokogiri/more.rb', line 10 def children_groups(*selectors) groups = [] flat = children.select { |node| selectors.any? { |s| node.matches?(s) } } groups << make_group(flat, selectors) until flat.empty? groups end |
#each_term ⇒ Object
17 18 19 |
# File 'lib/nokogiri/more.rb', line 17 def each_term children_groups('dt', 'dd') end |