Sha256: 20a258cc14844eadd172f9a861cf80d3eccd8519e7b2f5e30b3fb70a826c68ff

Contents?: true

Size: 731 Bytes

Versions: 4

Compression:

Stored size: 731 Bytes

Contents

module Feedjira

  module Parser
    # Parser for dealing with Feedburner Atom feeds.
    class AtomFeedBurner
      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 :"atom10:link", :as => :hubs, :value => :href, :with => {:rel => "hub"}
      elements :entry, :as => :entries, :class => AtomFeedBurnerEntry

      def self.able_to_parse?(xml) #:nodoc:
        ((/Atom/ =~ xml) && (/feedburner/ =~ xml) && !(/\<rss|\<rdf/ =~ xml)) || false
      end
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
feedjira-1.2.0 lib/feedjira/parser/atom_feed_burner.rb
feedjira-1.1.0 lib/feedjira/parser/atom_feed_burner.rb
feedjira-1.0.0 lib/feedjira/parser/atom_feed_burner.rb
feedjira-0.9.0 lib/feedjira/parser/atom_feed_burner.rb