require 'simple-rss' require 'open-uri' module Feed2Mail class Feed attr_reader :uri def initialize(uri) @uri = uri @data = nil end def items @data ||= SimpleRSS.parse open @uri @data.entries.collect { |e| Item.new e } end end end