# File lib/rubyful_soup.rb, line 358 def recursive_children stack = [[self, 0]] catch(:stop_iteration) do until stack.empty? tag, start = stack.pop for i in start...tag.contents.length a = tag.contents[i] yield a if a.is_a? TagModule and not tag.contents.empty? and i < tag.contents.length stack.push([tag, i+1]) stack.push([a, 0]) break end end if tag.is_a? TagModule end end end