26 lines
546 B
Ruby
26 lines
546 B
Ruby
|
require 'gitlab/markdown'
|
||
|
|
||
|
module Gitlab
|
||
|
module Markdown
|
||
|
module CombinedPipeline
|
||
|
def self.new(*pipelines)
|
||
|
Class.new(Pipeline) do
|
||
|
const_set :PIPELINES, pipelines
|
||
|
|
||
|
def self.filters
|
||
|
pipelines.flat_map(&:filters)
|
||
|
end
|
||
|
|
||
|
def self.transform_context(context)
|
||
|
pipelines.reduce(context) { |context, pipeline| pipeline.transform_context(context) }
|
||
|
end
|
||
|
|
||
|
def self.pipelines
|
||
|
self::PIPELINES
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|