Class: Html2rss::AutoSource::Channel
- Inherits:
-
Object
- Object
- Html2rss::AutoSource::Channel
- Defined in:
- lib/html2rss/auto_source/channel.rb
Overview
Extracts channel information from
-
the HTML document’s <head>.
-
the HTTP response
Instance Method Summary collapse
- #description ⇒ Object
- #generator ⇒ Object
- #image ⇒ Object
-
#initialize(parsed_body, url:, response:, articles: []) ⇒ Channel
constructor
A new instance of Channel.
- #language ⇒ Object
- #last_build_date ⇒ Object
- #title ⇒ Object
- #ttl ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(parsed_body, url:, response:, articles: []) ⇒ Channel
Returns a new instance of Channel.
14 15 16 17 18 19 |
# File 'lib/html2rss/auto_source/channel.rb', line 14 def initialize(parsed_body, url:, response:, articles: []) @parsed_body = parsed_body @url = url @response = response @articles = articles end |
Instance Method Details
#description ⇒ Object
24 |
# File 'lib/html2rss/auto_source/channel.rb', line 24 def description = extract_description |
#generator ⇒ Object
29 30 31 |
# File 'lib/html2rss/auto_source/channel.rb', line 29 def generator "html2rss V. #{::Html2rss::VERSION} (using auto_source scrapers: #{scraper_counts})" end |
#image ⇒ Object
25 |
# File 'lib/html2rss/auto_source/channel.rb', line 25 def image = extract_image |
#language ⇒ Object
23 |
# File 'lib/html2rss/auto_source/channel.rb', line 23 def language = extract_language |
#last_build_date ⇒ Object
27 |
# File 'lib/html2rss/auto_source/channel.rb', line 27 def last_build_date = response.headers['last-modified'] |
#title ⇒ Object
22 |
# File 'lib/html2rss/auto_source/channel.rb', line 22 def title = extract_title |
#ttl ⇒ Object
26 |
# File 'lib/html2rss/auto_source/channel.rb', line 26 def ttl = extract_ttl |
#url ⇒ Object
21 |
# File 'lib/html2rss/auto_source/channel.rb', line 21 def url = extract_url |