Class: OpmlReader

Inherits:
Object
  • Object
show all
Defined in:
lib/imap-feeder/opmlreader.rb

Overview

Parses an OPML File and extracts the folders and urls of the feeds. A tree like structure is built with FoodFolders and FeedUrls as leafes.

Class Method Summary collapse

Class Method Details

.get(file) ⇒ Object

Entry point for the parsing process. Takes the filecontent as a string and returns the root element.



21
22
23
24
# File 'lib/imap-feeder/opmlreader.rb', line 21

def self.get(file)
  opml = REXML::Document.new(file)
  parse_opml(opml.elements['opml/body'])
end