Sha256: 97e04571e48b01f5a33e66b5e2b114c4a7a0d3c0293cda49710c6b5e6a90a662

Contents?: true

Size: 387 Bytes

Versions: 14

Compression:

Stored size: 387 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  module Rendering
    class Join < AbstractStep
      def render
        options = config.separator_options || {}
        next_step(values.map { |x| x.html_safe? ? x : html_escape(x) }.to_sentence(options).html_safe)
      end

      private

      def html_escape(*args)
        ERB::Util.html_escape(*args)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
blacklight-7.40.0 app/presenters/blacklight/rendering/join.rb
blacklight-7.39.0 app/presenters/blacklight/rendering/join.rb
blacklight-7.38.0 app/presenters/blacklight/rendering/join.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/app/presenters/blacklight/rendering/join.rb
blacklight-7.37.0 app/presenters/blacklight/rendering/join.rb
blacklight-7.36.2 app/presenters/blacklight/rendering/join.rb
blacklight-7.36.1 app/presenters/blacklight/rendering/join.rb
blacklight-7.36.0 app/presenters/blacklight/rendering/join.rb
blacklight-7.35.0 app/presenters/blacklight/rendering/join.rb
blacklight-7.34.0 app/presenters/blacklight/rendering/join.rb
blacklight-8.0.0.beta4 app/presenters/blacklight/rendering/join.rb
blacklight-8.0.0.beta3 app/presenters/blacklight/rendering/join.rb
blacklight-8.0.0.beta2 app/presenters/blacklight/rendering/join.rb
blacklight-8.0.0.beta1 app/presenters/blacklight/rendering/join.rb