Sha256: 163aac30108b115a8d20eda4e204ffa59173a1f9226d94ef66ec6af42d1bee95

Contents?: true

Size: 562 Bytes

Versions: 1

Compression:

Stored size: 562 Bytes

Contents

# frozen_string_literal: true

module Temple
  module Generators
    # Implements a threaded rails output buffer.
    #
    #   output_buffer = ActionView::OutputBuffer.new
    #   output_buffer.safe_concat "static"
    #   output_buffer.safe_concat dynamic
    #   output_buffer.to_s
    class ThreadedRailsOutputBuffer < RailsOutputBuffer
      set_options buffer_class: 'ActionView::OutputBuffer', buffer: 'output_buffer'

      def on_dynamic(code)
        concat(code)
      end

      def return_buffer
        "#{buffer}.to_s"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
async_partial-0.2.0 lib/async_partial/handlers/slim.rb