Method: Hpricot::Traverse#extract_text
- Defined in:
- lib/parser.rb
#extract_text ⇒ Object
270 271 272 273 274 275 276 |
# File 'lib/parser.rb', line 270 def extract_text t='' self.traverse_all_element do |e| t+=e.content.to_s if e.is_a?(Hpricot::Text) end t end |