class Feedjira::Parser::AtomFeedBurner

Parser for dealing with Feedburner Atom feeds.

Attributes

feed_url[W]
url[W]

Public Class Methods

able_to_parse?(xml) click to toggle source
# File lib/feedjira/parser/atom_feed_burner.rb, line 23
def self.able_to_parse?(xml)
  (xml.include?("<feed") && xml.include?("Atom") && xml.include?("feedburner") && !(/<rss|<rdf/ =~ xml)) || false
end
preprocess(xml) click to toggle source
# File lib/feedjira/parser/atom_feed_burner.rb, line 39
def self.preprocess(xml)
  Preprocessor.new(xml).to_xml
end

Public Instance Methods

feed_url() click to toggle source

Feed feed_url is <link> with type=“application/atom+xml” if present, <atom10:link> with type=“application/atom+xml” otherwise

# File lib/feedjira/parser/atom_feed_burner.rb, line 35
def feed_url
  @feed_url || @feed_url_link || @feed_url_atom10_link
end
url() click to toggle source

Feed url is <link> with type=“text/html” if present, <link> with no type attribute otherwise

# File lib/feedjira/parser/atom_feed_burner.rb, line 29
def url
  @url || @url_text_html || @url_notype
end