Sha256: 3d4a89e61a8b39170992bb3f82b72c2a3c6e2e991b91c6af6a295ed381ae6fb6

Contents?: true

Size: 611 Bytes

Versions: 68

Compression:

Stored size: 611 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  module Rendering
    class HelperMethod < AbstractStep
      def render
        if config.helper_method
          render_helper # short circut the rest of the steps
        else
          next_step(values)
        end
      end

      private

      def render_helper
        context.send(config.helper_method,
                     **options.merge(document: document,
                                     field: config.field,
                                     config: config,
                                     value: values))
      end
    end
  end
end

Version data entries

68 entries across 67 versions & 2 rubygems

Version Path
blacklight-8.6.1 app/presenters/blacklight/rendering/helper_method.rb
blacklight-7.40.0 app/presenters/blacklight/rendering/helper_method.rb
blacklight-8.6.0 app/presenters/blacklight/rendering/helper_method.rb
blacklight-8.5.1 app/presenters/blacklight/rendering/helper_method.rb
blacklight-8.5.0 app/presenters/blacklight/rendering/helper_method.rb
blacklight-7.39.0 app/presenters/blacklight/rendering/helper_method.rb
blacklight-8.4.0 app/presenters/blacklight/rendering/helper_method.rb
blacklight-7.38.0 app/presenters/blacklight/rendering/helper_method.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/app/presenters/blacklight/rendering/helper_method.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/app/presenters/blacklight/rendering/helper_method.rb
blacklight-8.3.0 app/presenters/blacklight/rendering/helper_method.rb
blacklight-8.2.2 app/presenters/blacklight/rendering/helper_method.rb
blacklight-8.2.1 app/presenters/blacklight/rendering/helper_method.rb
blacklight-8.2.0 app/presenters/blacklight/rendering/helper_method.rb
blacklight-7.37.0 app/presenters/blacklight/rendering/helper_method.rb
blacklight-7.36.2 app/presenters/blacklight/rendering/helper_method.rb
blacklight-7.36.1 app/presenters/blacklight/rendering/helper_method.rb
blacklight-7.36.0 app/presenters/blacklight/rendering/helper_method.rb
blacklight-7.35.0 app/presenters/blacklight/rendering/helper_method.rb
blacklight-8.1.0 app/presenters/blacklight/rendering/helper_method.rb