Class: OPMLImporter
- Inherits:
-
Object
- Object
- OPMLImporter
- Defined in:
- lib/opml.rb
Instance Method Summary collapse
- #feed_urls ⇒ Object
-
#initialize(opml) ⇒ OPMLImporter
constructor
A new instance of OPMLImporter.
Constructor Details
#initialize(opml) ⇒ OPMLImporter
Returns a new instance of OPMLImporter.
3 4 5 6 7 |
# File 'lib/opml.rb', line 3 def initialize(opml) @opml = opml @doc = REXML::Document.new(@opml) @feed_urls = [] end |
Instance Method Details
#feed_urls ⇒ Object
9 10 11 12 13 14 |
# File 'lib/opml.rb', line 9 def feed_urls @doc.elements.each('//outline[@xmlUrl]') do |e| @feed_urls << e.attributes['xmlUrl'] end @feed_urls.uniq end |