Class: OPMLImporter

Inherits:
Object
  • Object
show all
Defined in:
lib/opml.rb

Instance Method Summary collapse

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_urlsObject



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