Class: HtmlElement::Children
- Inherits:
-
Array
- Object
- Array
- HtmlElement::Children
- Defined in:
- lib/htmlelement.rb
Instance Method Summary collapse
Instance Method Details
#traverse(&block) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/htmlelement.rb', line 9 def traverse(&block) each do |child| if child.kind_of? HtmlElement or child.kind_of? Children child.traverse(&block) else yield child end end end |