Module: GoogleCells::Reader
Constant Summary
Constants included from Fetcher
Instance Method Summary collapse
Methods included from Fetcher
Instance Method Details
#each_entry(url = nil, params = {}, &block) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/google_cells/reader.rb', line 8 def each_entry(url=nil, params={}, &block) doc = raw(url, params) reader = Nokogiri::XML::Reader(doc) reader.each do |node| next unless node.name == 'entry' && node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT block.call(Nokogiri.parse(node.outer_xml)) end end |