Class: Plumnailer::DocParser
- Inherits:
-
Object
- Object
- Plumnailer::DocParser
- Defined in:
- lib/plumnailer/doc_parser.rb
Overview
Parse an HTML document.
Instance Method Summary collapse
-
#parse(doc_string, source_url = nil) ⇒ Object
Parse an HTML document.
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 |