Method: HTML::Pipeline#to_document

Defined in:
lib/html/pipeline.rb

#to_document(input, context = {}, result = nil) ⇒ Object

Like call but guarantee the value returned is a DocumentFragment. Pipelines may return a DocumentFragment or a String. Callers that need a DocumentFragment should use this method.



129
130
131
132
# File 'lib/html/pipeline.rb', line 129

def to_document(input, context = {}, result = nil)
  result = call(input, context, result)
  HTML::Pipeline.parse(result[:output])
end