Class: Html2rss::HtmlExtractor::EnclosureExtractor
- Inherits:
-
Object
- Object
- Html2rss::HtmlExtractor::EnclosureExtractor
- Defined in:
- lib/html2rss/html_extractor/enclosure_extractor.rb
Overview
Extracts enclosures from HTML tags using various strategies.
Class Method Summary collapse
-
.call(article_tag, base_url) ⇒ Array<Hash{Symbol => Object}>
Normalized enclosure hashes.
Class Method Details
.call(article_tag, base_url) ⇒ Array<Hash{Symbol => Object}>
Returns normalized enclosure hashes.
11 12 13 14 15 16 17 18 19 |
# File 'lib/html2rss/html_extractor/enclosure_extractor.rb', line 11 def self.call(article_tag, base_url) [ Extractors::Image, Extractors::Media, Extractors::Pdf, Extractors::Iframe, Extractors::Archive ].flat_map { |strategy| strategy.call(article_tag, base_url:) } end |