Class: Genit::RssFeedItems
- Inherits:
-
Object
- Object
- Genit::RssFeedItems
- Defined in:
- lib/genit/project/rss_feed.rb
Overview
Items of an RSS Field
Instance Method Summary collapse
- #fill ⇒ Object
-
#initialize(feed, news_files, config) ⇒ RssFeedItems
constructor
A new instance of RssFeedItems.
Constructor Details
#initialize(feed, news_files, config) ⇒ RssFeedItems
Returns a new instance of RssFeedItems.
51 52 53 54 55 |
# File 'lib/genit/project/rss_feed.rb', line 51 def initialize feed, news_files, config @feed = feed @news_files = news_files @config = config end |
Instance Method Details
#fill ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'lib/genit/project/rss_feed.rb', line 57 def fill @news_files.each do |news| item = @feed.items.new_item item.title = RssFeedItemTitle.new(news).title item.link = @config[:address] item.date = Time.parse(NewsUtils.get_date_from_filename(news)) end end |