Class: ActionView::OutputBuffer

Inherits:
ActiveSupport::SafeBuffer
  • Object
show all
Defined in:
lib/action_view/template/handlers/erb.rb

Instance Method Summary collapse

Constructor Details

#initializeOutputBuffer

Returns a new instance of OutputBuffer.



8
9
10
11
# File 'lib/action_view/template/handlers/erb.rb', line 8

def initialize(*)
  super
  encode! if encoding_aware?
end

Instance Method Details

#<<(value) ⇒ Object Also known as: append=



13
14
15
# File 'lib/action_view/template/handlers/erb.rb', line 13

def <<(value)
  super(value.to_s)
end

#append_if_string=(value) ⇒ Object



18
19
20
21
22
23
# File 'lib/action_view/template/handlers/erb.rb', line 18

def append_if_string=(value)
  if value.is_a?(String) && !value.is_a?(NonConcattingString)
    ActiveSupport::Deprecation.warn("<% %> style block helpers are deprecated. Please use <%= %>", caller)
    self << value
  end
end