Method: Html2rss::Item#extract

Defined in:
lib/html2rss/item.rb

#extract(tag) ⇒ String

Selects and processes data according to the selector name.

Parameters:

  • tag (Symbol)

Returns:

  • (String)

    the extracted value for the selector.



75
76
77
78
79
80
81
82
# File 'lib/html2rss/item.rb', line 75

def extract(tag)
  attribute_options = config.selector_attributes_with_channel(tag.to_sym)

  post_process(
    ItemExtractors.item_extractor_factory(attribute_options, xml).get,
    attribute_options.fetch(:post_process, false)
  )
end