Class: Feedjira::Parser::AtomGoogleAlerts

Inherits:
Object
  • Object
show all
Includes:
FeedUtilities, SAXMachine
Defined in:
lib/feedjira/parser/atom_google_alerts.rb

Overview

Parser for dealing with Feedburner Atom feeds.

Constant Summary

Constants included from FeedUtilities

FeedUtilities::UPDATABLE_ATTRIBUTES

Instance Attribute Summary

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?

Class Method Details

.able_to_parse?(xml) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/feedjira/parser/atom_google_alerts.rb', line 17

def self.able_to_parse?(xml)
  Atom.able_to_parse?(xml) && (%r{<id>tag:google\.com,2005:[^<]+/com\.google/alerts/} === xml) # rubocop:disable Style/CaseEquality
end

.preprocess(xml) ⇒ Object



21
22
23
# File 'lib/feedjira/parser/atom_google_alerts.rb', line 21

def self.preprocess(xml)
  Preprocessor.new(xml).to_xml
end