Class: Feedjira::Parser::AtomFeedBurner
- Inherits:
-
Object
- Object
- Feedjira::Parser::AtomFeedBurner
- Includes:
- FeedUtilities, SAXMachine
- Defined in:
- lib/feedjira/parser/atom_feed_burner.rb
Overview
Parser for dealing with Feedburner Atom feeds.
Constant Summary
Constants included from FeedUtilities
FeedUtilities::UPDATABLE_ATTRIBUTES
Instance Attribute Summary collapse
-
#feed_url ⇒ Object
Feed feed_url is <link> with type=“application/atom+xml” if present, <atom10:link> with type=“application/atom+xml” otherwise.
-
#url ⇒ Object
Feed url is <link> with type=“text/html” if present, <link> with no type attribute otherwise.
Attributes included from FeedUtilities
#etag, #last_modified, #new_entries, #updated
Class Method Summary collapse
Methods included from FeedUtilities
included, #new_entries?, #sanitize_entries!, #update_attribute, #update_from_feed, #updated?
Instance Attribute Details
#feed_url ⇒ Object
Feed feed_url is <link> with type=“application/atom+xml” if present, <atom10:link> with type=“application/atom+xml” otherwise
34 35 36 |
# File 'lib/feedjira/parser/atom_feed_burner.rb', line 34 def feed_url @feed_url || @feed_url_link || @feed_url_atom10_link end |
#url ⇒ Object
Feed url is <link> with type=“text/html” if present, <link> with no type attribute otherwise
28 29 30 |
# File 'lib/feedjira/parser/atom_feed_burner.rb', line 28 def url @url || @url_text_html || @url_notype end |
Class Method Details
.able_to_parse?(xml) ⇒ Boolean
22 23 24 |
# File 'lib/feedjira/parser/atom_feed_burner.rb', line 22 def self.able_to_parse?(xml) ((/Atom/ =~ xml) && (/feedburner/ =~ xml) && !(/\<rss|\<rdf/ =~ xml)) || false # rubocop:disable Metrics/LineLength end |
.preprocess(xml) ⇒ Object
38 39 40 |
# File 'lib/feedjira/parser/atom_feed_burner.rb', line 38 def self.preprocess(xml) Preprocessor.new(xml).to_xml end |