lib/html/pipeline.rb
# Apply all filters in the pipeline to the given HTML.
#
# html    - A String containing HTML or a DocumentFragment object.
# context - The context hash passed to each filter. See the Filter docs
#           for more info on possible values. This object MUST NOT be modified
#           in place by filters.  Use the Result for passing state back.
# result  - The result Hash passed to each filter for modification.  This
#           is where Filters store extracted information from the content.
#
# Returns the result Hash after being filtered by this Pipeline.  Contains an
# :output key with the DocumentFragment or String HTML markup based on the
# output of the last filter in the pipeline.
Apply all filters in the pipeline to the given HTML.
html    - A String containing HTML or a DocumentFragment object.
context - The context hash passed to each filter. See the Filter docs
for more info on possible values. This object MUST NOT be modified
in place by filters.  Use the Result for passing state back.
result  - The result Hash passed to each filter for modification.  This
is where Filters store extracted information from the content.

Returns the result Hash after being filtered by this Pipeline.  Contains an
:output key with the DocumentFragment or String HTML markup based on the
output of the last filter in the pipeline.
Apply all filters in the pipeline to the given HTML . html - A String containing HTML or a DocumentFragment object . context - The context hash passed to each filter . See the Filter docs for more info on possible values . This object MUST NOT be modified in place by filters . Use the Result for passing state back . result - The result Hash passed to each filter for modification . This is where Filters store extracted information from the content . Returns the result Hash after being filtered by this Pipeline . Contains an : output key with the DocumentFragment or String HTML markup based on the output of the last filter in the pipeline .
def call(html, context = {}, result = nil)
      context = @default_context.merge(context)
      context = context.freeze
      result ||= @result_class.new
      payload = default_payload :filters => @filters.map(&:name),
        :context => context, :result => result
      instrument "call_pipeline.html_pipeline", payload do
        result[:output] =
          @filters.inject(html) do |doc, filter|
            perform_filter(filter, doc, context, result)
          end
      end
      result
    end
def call ( html , context = { } , result = nil ) context = @default_context . merge ( context ) context = context . freeze result ||= @result_class . new payload = default_payload :filters => @filters . map ( & :name ) , :context => context , :result => result instrument "call_pipeline.html_pipeline" , payload do result [ :output ] = @filters . inject ( html ) do | doc , filter | perform_filter ( filter , doc , context , result ) end end result end
Apply all filters in the pipeline to the given HTML.
Apply all filters in the pipeline to the given HTML .
html
<not_specific>
context
<not_specific>
result
<not_specific>