Sha256: 3718b16ba4076b5c421f38316a99f1677bb1f31d13c70b81384247eb4d1196ca

Contents?: true

Size: 317 Bytes

Versions: 2

Compression:

Stored size: 317 Bytes

Contents

require 'rubygems'
require 'rss'

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

2 entries across 2 versions & 1 rubygems

Version Path
twog-0.1.0 lib/twog/rss_parser.rb
twog-0.0.1 lib/twog/rss_parser.rb