Class: FeedNormalizer::RubyRssParser
- Defined in:
- lib/parsers/rss.rb
Class Method Summary collapse
- .parse(xml, loose) ⇒ Object
- .parser ⇒ Object
-
.priority ⇒ Object
Fairly high priority; a fast and strict parser.
Class Method Details
.parse(xml, loose) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/parsers/rss.rb', line 28 def self.parse(xml, loose) begin rss = parser.parse(xml) rescue Exception => e #puts "Parser #{parser} failed because #{e.message.gsub("\n",', ')}" return nil end # check for channel to make sure we're only dealing with RSS. rss && rss.respond_to?(:channel) ? package(rss, loose) : nil end |
.parser ⇒ Object
24 25 26 |
# File 'lib/parsers/rss.rb', line 24 def self.parser RSS::Parser end |
.priority ⇒ Object
Fairly high priority; a fast and strict parser.
41 42 43 |
# File 'lib/parsers/rss.rb', line 41 def self.priority 100 end |