Class: Feedjira::Parser::AtomGoogleAlertsEntry

Inherits:
Object
  • Object
show all
Includes:
AtomEntryUtilities, FeedEntryUtilities, SAXMachine
Defined in:
lib/feedjira/parser/atom_google_alerts_entry.rb

Overview

Parser for dealing with Feedburner Atom feed entries.

Constant Summary

Constants included from DateTimeUtilities

DateTimeUtilities::DATE_PARSERS

Instance Method Summary collapse

Methods included from AtomEntryUtilities

included, #title

Methods included from FeedEntryUtilities

#[], #[]=, #each, #id, #parse_datetime, #published, #published=, #sanitize!, #updated=

Methods included from DateTimeUtilities

#parse_datetime

Instance Method Details

#urlObject


11
12
13
14
15
16
17
18
# File 'lib/feedjira/parser/atom_google_alerts_entry.rb', line 11

def url
  url = super
  return unless url&.start_with?("https://www.google.com/url?")

  uri = URI(url)
  cons = URI.decode_www_form(uri.query).assoc("url")
  cons && cons[1]
end