From b962a14b19dff69f54818c3052f536c3aa94a38a Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 14 May 2015 20:49:25 +0200 Subject: Put classes into module. --- lib/rss2html/feed_item.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'lib/rss2html/feed_item.rb') diff --git a/lib/rss2html/feed_item.rb b/lib/rss2html/feed_item.rb index a64c9fc..82adb4b 100644 --- a/lib/rss2html/feed_item.rb +++ b/lib/rss2html/feed_item.rb @@ -14,14 +14,16 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -class FeedItem - attr_reader :title, :author, :date, :summary, :url +module Rss2Html + class FeedItem + attr_reader :title, :author, :date, :summary, :url - def initialize(item) - @title = item.title.content - @author = item.author.name.content - @date = item.updated.content - @summary = item.summary.content.strip - @url = item.link.href + def initialize(item) + @title = item.title.content + @author = item.author.name.content + @date = item.updated.content + @summary = item.summary.content.strip + @url = item.link.href + end end end -- cgit v1.2.3