diff options
-rwxr-xr-x | bin/rss2html | 4 | ||||
-rw-r--r-- | lib/rss2html/feed.rb | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/rss2html b/bin/rss2html index 14febfa..0661360 100755 --- a/bin/rss2html +++ b/bin/rss2html @@ -29,7 +29,7 @@ end feeds = YAML.load(IO.read(config_file)) items = [] -feeds.each do |t, f| - feed = Rss2Html::Feed.new(t, f) +feeds.each do |k, f| + feed = Rss2Html::Feed.new(f) puts feed.render end diff --git a/lib/rss2html/feed.rb b/lib/rss2html/feed.rb index fa2f4fc..909b08c 100644 --- a/lib/rss2html/feed.rb +++ b/lib/rss2html/feed.rb @@ -22,8 +22,9 @@ module Rss2Html class Feed attr_reader :title, :url - def initialize(title, args) - @title, @url = title, args['url'] + def initialize(args) + @title = args.delete('title') + @url = args.delete('url') @feed_header = load_template('feed_header.html.erb') @feed_footer = load_template('feed_footer.html.erb') |