Class: YouTubeIt::Parser::CommentsFeedParser

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 comments



41
42
43
44
45
46
47
48
49
50
# File 'lib/youtube_it/parser.rb', line 41

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

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