Class: Fortitude::RenderingContext::OutputBufferHolder

Inherits:
Object
  • Object
show all
Defined in:
lib/fortitude/rendering_context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOutputBufferHolder

Returns a new instance of OutputBufferHolder.


230
231
232
233
234
235
236
237
238
# File 'lib/fortitude/rendering_context.rb', line 230

def initialize
  if defined?(::ActionView::OutputBuffer)
    @output_buffer = ::ActionView::OutputBuffer.new
  else
    @output_buffer = ::ActiveSupport::SafeBuffer.new
  end

  @output_buffer.force_encoding(Encoding::UTF_8) if @output_buffer.respond_to?(:force_encoding)
end

Instance Attribute Details

#output_bufferObject

Returns the value of attribute output_buffer


228
229
230
# File 'lib/fortitude/rendering_context.rb', line 228

def output_buffer
  @output_buffer
end