Class: Tubeclip::Parser::SubscriptionFeedParser

Inherits:
FeedParser
  • Object
show all
Defined in:
lib/tubeclip/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 Tubeclip::Parser::FeedParser

Instance Method Details

#parse_content(content) ⇒ Object



351
352
353
354
355
356
357
358
359
360
# File 'lib/tubeclip/parser.rb', line 351

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

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