Class: Plumnailer::DocParser

Inherits:
Object
  • Object
show all
Defined in:
lib/plumnailer/doc_parser.rb

Overview

Parse an HTML document.

Instance Method Summary collapse

Instance Method Details

#parse(doc_string, source_url = nil) ⇒ Object

Parse an HTML document.



11
12
13
14
15
# File 'lib/plumnailer/doc_parser.rb', line 11

def parse(doc_string, source_url=nil)
  doc = Nokogiri::HTML(doc_string).extend(Plumnailer::Doc)
  doc.source_url = source_url
  doc
end