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.


221
222
223
224
225
226
227
228
229
# File 'lib/fortitude/rendering_context.rb', line 221

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


219
220
221
# File 'lib/fortitude/rendering_context.rb', line 219

def output_buffer
  @output_buffer
end