Sha256: 868fb6c630582caeb77fafce6642251ed3613babee013d2788cd78d78ee7677f

Contents?: true

Size: 283 Bytes

Versions: 4

Compression:

Stored size: 283 Bytes

Contents

module RssParser
  def parse(rss_feed_url)
    raise Exception.new('RSS feed missing') unless rss_feed_url
    rss = RSS::Parser.parse(get_content(rss_feed_url), false)
    rss.items
  end

  def get_content(rss_feed_url)
    open(rss_feed_url) do |f|
      f.read
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twog-0.3.0 lib/twog/rss_parser.rb
twog-0.2.2 lib/twog/rss_parser.rb
twog-0.2.1 lib/twog/rss_parser.rb
twog-0.2.0 lib/twog/rss_parser.rb