Sha256: 2a23aaec33c91a290109f8dcd89b01177901a0416c86179d0f842b77a0ff7cbc
Contents?: true
Size: 928 Bytes
Versions: 2
Compression:
Stored size: 928 Bytes
Contents
module Feedzirra module Parser # == Summary # Parser for dealing with Atom feeds. # # == Attributes # * title # * feed_url # * url # * entries class Atom include SAXMachine include FeedUtilities element :title element :link, :as => :url, :value => :href, :with => {:type => "text/html"} element :link, :as => :feed_url, :value => :href, :with => {:type => "application/atom+xml"} elements :link, :as => :links, :value => :href element :subtitle, :as => :description elements :entry, :as => :entries, :class => AtomEntry def self.able_to_parse?(xml) #:nodoc: xml =~ /(Atom)|(#{Regexp.escape("http://purl.org/atom")})|(#{Regexp.escape("http://www.w3.org/2005/Atom")})/ end def url @url || links.last end def feed_url @feed_url || links.first end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fblee-feedzirra-0.0.18 | lib/feedzirra/parser/atom.rb |
fblee-feedzirra-0.0.17 | lib/feedzirra/parser/atom.rb |