Create a gist now

Instantly share code, notes, and snippets.

@atmosx /rss.rb
Created Jan 20, 2013

#!/usr/bin/env ruby
# encoding: UTF-8
require 'feedzirra'
class NewsDisplay
def initialize
rss1 = "http://www.healthierworld.gr/rss/feed/news"
@feed = Feedzirra::Feed.fetch_and_parse(rss1)
@title = @feed.title
@entries = @feed.entries
end
# print entries
def feed_list
x = 0
titles = []
while x < 4
titles << @entries[x]
x += 1
end
titles.each do |entry|
p entry.title
p entry.summary
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment