Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (24 sloc) 0.791 kB
require File.expand_path('./atom', File.dirname(__FILE__))
module Feedzirra
module Parser
class GoogleDocsAtom
include SAXMachine
include FeedUtilities
element :title
element :subtitle, :as => :description
element :link, :as => :url, :value => :href, :with => {:type => "text/html"}
element :link, :as => :feed_url, :value => :href, :with => {:type => "application/atom+xml"}
elements :link, :as => :links, :value => :href
elements :entry, :as => :entries, :class => GoogleDocsAtomEntry
def url
@url ||= links.first
end
def self.able_to_parse?(xml) #:nodoc:
%r{<id>https?://docs.google.com/.*\</id\>} =~ xml
end
def feed_url
@feed_url ||= links.first
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.