Class: Nokogiri::XML::Node

Inherits:
Object show all
Defined in:
lib/sitefuel/processors/HTMLProcessor.rb

Instance Method Summary collapse

Instance Method Details

#traverse_text(&block) ⇒ Object

implements the #traverse_text method from hpricot



16
17
18
19
20
21
22
# File 'lib/sitefuel/processors/HTMLProcessor.rb', line 16

def traverse_text(&block)
  children.each do |node|
    if node.text?
      block.call(node)
    end
  end
end