Sha256: 1eec618339bcfcb7c99682b17b943a7e5060b10b56598e8bd833ee5ba32926d1

Contents?: true

Size: 450 Bytes

Versions: 2

Compression:

Stored size: 450 Bytes

Contents

require File.dirname(__FILE__) + '/fetcher'

module GoogleCells

  module Reader
    include GoogleCells::Fetcher

    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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
google-cells-0.4.0 lib/google_cells/reader.rb
google-cells-0.3.0 lib/google_cells/reader.rb