class HtmlLinksToTextInterceptor::LinkScrubber

A specialized Scrubber to convert HTML links to text

Public Instance Methods

scrub(node) click to toggle source
# File lib/html_links_to_text_interceptor.rb, line 11
def scrub(node)
  replace_link_node_with_text_node(node) if link?(node)
end

Private Instance Methods

extract_url(node) click to toggle source
# File lib/html_links_to_text_interceptor.rb, line 23
def extract_url(node)
  href = node.attributes["href"]
  return nil unless href
  href.value
end