Class: Spix::Parser::Atom
- Includes:
- Feedzirra::FeedUtilities, SAXMachine
- Defined in:
- lib/spix_parser/custom_parsers/atom.rb
Class Method Summary collapse
-
.able_to_parse?(xml) ⇒ Boolean
:nodoc:.
Instance Method Summary collapse
Class Method Details
.able_to_parse?(xml) ⇒ Boolean
:nodoc:
19 20 21 |
# File 'lib/spix_parser/custom_parsers/atom.rb', line 19 def self.able_to_parse?(xml) #:nodoc: (xml =~ /application\/atom\+xml|(#{Regexp.escape("http://www.w3.org/2005/Atom")})|(#{Regexp.escape("http://purl.org/atom")})/) && (xml =~ /\<feed\s/) end |
Instance Method Details
#feed_url ⇒ Object
27 28 29 |
# File 'lib/spix_parser/custom_parsers/atom.rb', line 27 def feed_url @feed_url || links.first end |
#last_modified ⇒ Object
31 32 33 |
# File 'lib/spix_parser/custom_parsers/atom.rb', line 31 def last_modified @last_modified.present? ? @last_modified : super end |
#url ⇒ Object
23 24 25 |
# File 'lib/spix_parser/custom_parsers/atom.rb', line 23 def url @url || links.last end |