Method: Html2rss::ItemExtractors::Href#initialize

Defined in:
lib/html2rss/item_extractors/href.rb

#initialize(xml, options) ⇒ Href

Initializes the Href extractor.

Parameters:

  • xml (Nokogiri::XML::Element)
  • options (Options)


34
35
36
37
38
# File 'lib/html2rss/item_extractors/href.rb', line 34

def initialize(xml, options)
  @options = options
  @element = ItemExtractors.element(xml, options.selector)
  @href = @element.attr('href').to_s
end