Parent

Class/Module Index [+]

Quicksearch

ActiveSupport::SafeBuffer

Public Class Methods

new(*) click to toggle source
# File lib/active_support/core_ext/string/output_safety.rb, line 93
def initialize(*)
  @dirty = false
  super
end

Public Instance Methods

+(other) click to toggle source
# File lib/active_support/core_ext/string/output_safety.rb, line 112
def +(other)
  dup.concat(other)
end
<<(value) click to toggle source
Alias for: concat
concat(value) click to toggle source
# File lib/active_support/core_ext/string/output_safety.rb, line 103
def concat(value)
  if dirty? || value.html_safe?
    super(value)
  else
    super(ERB::Util.h(value))
  end
end
Also aliased as: original_concat, <<
html_safe?() click to toggle source
# File lib/active_support/core_ext/string/output_safety.rb, line 116
def html_safe?
  !dirty?
end
initialize_copy(other) click to toggle source
# File lib/active_support/core_ext/string/output_safety.rb, line 98
def initialize_copy(other)
  super
  @dirty = other.dirty?
end
original_concat(value) click to toggle source
Alias for: concat
safe_concat(value) click to toggle source
# File lib/active_support/core_ext/string/output_safety.rb, line 88
def safe_concat(value)
  raise SafeConcatError if dirty?
  original_concat(value)
end
to_param() click to toggle source
# File lib/active_support/core_ext/string/output_safety.rb, line 124
def to_param
  to_str
end
to_s() click to toggle source
# File lib/active_support/core_ext/string/output_safety.rb, line 120
def to_s
  self
end
to_yaml(*args) click to toggle source
# File lib/active_support/core_ext/string/output_safety.rb, line 128
def to_yaml(*args)
  to_str.to_yaml(*args)
end

Protected Instance Methods

dirty?() click to toggle source
# File lib/active_support/core_ext/string/output_safety.rb, line 147
def dirty?
  @dirty
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.