Class: YouTubeIt::Parser::PlaylistsFeedParser

Inherits:
FeedParser
  • Object
show all
Defined in:
lib/youtube_it/parser.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from FeedParser

#initialize, #parse, #parse_single_entry, #parse_videos, #remove_bom

Constructor Details

This class inherits a constructor from YouTubeIt::Parser::FeedParser

Instance Method Details

#parse_content(content) ⇒ Object

return array of playlist objects



99
100
101
102
103
104
105
106
107
108
# File 'lib/youtube_it/parser.rb', line 99

def parse_content(content)
  doc = Nokogiri::XML(content.body)
  feed = doc.at("feed")

  playlists = []
  feed.css("entry").each do |entry|
    playlists << parse_entry(entry)
  end
  return playlists
end