Class: ActionView::OutputBuffer

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

Instance Method Summary (collapse)

Methods inherited from ActiveSupport::SafeBuffer

#+, #concat, #html_safe, #html_safe?, #to_s, #to_yaml

Methods inherited from String

#acts_like_string?, #as_json, #at, #blank?, #camelize, #classify, #constantize, #dasherize, #demodulize, #encode_json, #encoding_aware?, #exclude?, #first, #foreign_key, #from, #html_safe, #html_safe!, #humanize, #is_utf8?, #last, #mb_chars, #ord, #parameterize, #pluralize, #singularize, #squish, #squish!, #strip_heredoc, #tableize, #titleize, #to, #to_date, #to_datetime, #to_time, #truncate, #underscore

Constructor Details

- (OutputBuffer) initialize

A new instance of OutputBuffer



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

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

Instance Method Details

- (Object) <<(value) Also known as: append=



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

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

- (Object) append_if_string=(value)



18
19
20
21
22
23
# File 'actionpack/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