Sha256: 3d53368ffedcfa13dbe8336dc45673373a45f0dac19ca198f804ca2a30405862

Contents?: true

Size: 841 Bytes

Versions: 14

Compression:

Stored size: 841 Bytes

Contents

module Blacklight
  module Rendering
    # The field rendering pipeline
    class Pipeline
      def initialize(values, config, document, context, options)
        @values = values
        @config = config
        @document = document
        @context = context
        @options = options
      end

      attr_reader :values, :config, :document, :context, :options

      def self.render(values, config, document, context, options)
        new(values, config, document, context, options).render
      end

      def render
        first, *rest = *stack
        first.new(values, config, document, context, options, rest).render
      end

      protected

        # Ordered list of operations, Terminator must be at the end.
        def stack
          [HelperMethod, LinkToFacet, Microdata, Join, Terminator]
        end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
blacklight-6.7.3 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.7.2 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.7.1 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.7.0 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.6.2 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.6.1 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.6.0 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.5.0 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.4.2 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.4.1 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.4.0 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.3.3 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.3.1 app/presenters/blacklight/rendering/pipeline.rb
blacklight-6.3.0 app/presenters/blacklight/rendering/pipeline.rb