class Newsblurry::StoryParser

Attributes

stories[R]

Public Class Methods

new(feed, story_hashes) click to toggle source
# File lib/newsblurry/story_parser.rb, line 6
def initialize(feed, story_hashes)
  @stories = []
  @feed = feed
  @story_hashes = story_hashes
  parse_stories
end

Private Instance Methods

parse_stories() click to toggle source
# File lib/newsblurry/story_parser.rb, line 15
def parse_stories
  @stories = @story_hashes.map do |story_hash|
    Newsblurry::Story.new(@feed, story_hash)
  end
end