Method: Html2rss::AutoSource::Channel#initialize

Defined in:
lib/html2rss/auto_source/channel.rb

#initialize(parsed_body, url:, headers:, articles: [], stylesheets: []) ⇒ Channel

Returns a new instance of Channel.

Parameters:

  • parsed_body (Nokogiri::HTML::Document)

    The parsed HTML document.

  • url (Addressable::URI)

    The URL of the channel.

  • headers (Hash<String, String>)

    the http headers

  • articles (Array<Html2rss::AutoSource::Article>) (defaults to: [])

    The articles.



16
17
18
19
20
21
22
# File 'lib/html2rss/auto_source/channel.rb', line 16

def initialize(parsed_body, url:, headers:, articles: [], stylesheets: [])
  @parsed_body = parsed_body
  @url = url
  @headers = headers
  @articles = articles
  @stylesheets = stylesheets
end