Class: Metrocot::Scanners::TextScanner

Inherits:
BaseScanner show all
Defined in:
lib/metrocot.rb

Overview

just pulls out the plain text. This will probably be the most commonly used scanner.

Instance Method Summary collapse

Instance Method Details

#scan(data) ⇒ Object



1105
1106
1107
1108
1109
1110
1111
1112
# File 'lib/metrocot.rb', line 1105

def scan( data )
	if data.is_a? Hpricot::Elem
		data = data.inner_text
	else
		data = data.to_s
	end
	data
end