Class: Tubeclip::Parser::CommentsFeedParser
- Inherits:
-
FeedParser
- Object
- FeedParser
- Tubeclip::Parser::CommentsFeedParser
- Defined in:
- lib/tubeclip/parser.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#parse_content(content) ⇒ Object
return array of comments.
Methods inherited from FeedParser
#initialize, #parse, #parse_single_entry, #parse_videos, #remove_bom
Constructor Details
This class inherits a constructor from Tubeclip::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/tubeclip/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 |