Class: RSSable::Detection::FeedFinder
- Inherits:
-
Object
- Object
- RSSable::Detection::FeedFinder
- Defined in:
- lib/rssable/detection/feed_finder.rb
Class Method Summary collapse
-
.call(url:) ⇒ Array<String>
It returns array of RSS feed links for given URL.
Class Method Details
.call(url:) ⇒ Array<String>
It returns array of RSS feed links for given URL
7 8 9 10 11 12 |
# File 'lib/rssable/detection/feed_finder.rb', line 7 def self.call(url:) response = RestClient.get(url) html = Nokogiri::HTML(response.body) html.css("link[type='application/rss+xml']").map { |node| node[:href] } end |