lib/term_extraction/yahoo.rb in alexrabarts-term_extraction-0.1.1 vs lib/term_extraction/yahoo.rb in alexrabarts-term_extraction-0.1.2

- old
+ new

@@ -1,11 +1,12 @@ require 'nokogiri' class TermExtraction class Yahoo < TermExtraction def terms - terms = [] + terms = [] + data = Nokogiri::XML.parse(remote_xml) unless data.nil? data.search('//s:Result', ns).each do |n| terms << n.text end @@ -40,12 +41,8 @@ uri end def remote_xml open(url).read - end - - def data - @data ||= Nokogiri::XML.parse(remote_xml) end end end \ No newline at end of file