class Html2rss::ItemExtractors::Html

Return the HTML of the attribute.

Imagine this HTML structure:

<p>Lorem <b>ipsum</b> dolor ...</p>

YAML usage example:

selectors:
  description:
    selector: p
    extractor: html

Would return:

'<p>Lorem <b>ipsum</b> dolor ...</p>'

Always make sure to sanitize the HTML during post processing with AttributePostProcessors::SanitizeHtml.

Public Class Methods

new(xml, options) click to toggle source
# File lib/html2rss/item_extractors/html.rb, line 23
def initialize(xml, options)
  @element = ItemExtractors.element(xml, options)
end

Public Instance Methods

get() click to toggle source

@return [String]

# File lib/html2rss/item_extractors/html.rb, line 29
def get
  @element.to_s
end