Namespace
Methods
- #
- C
- E
- H
- I
- N
- O
- P
- R
- S
- T
Constants
Class Public methods
new(str = "") Link
Instance Public methods
%(args) Link
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 222 def %(args) case args when Hash escaped_args = args.transform_values { |arg| html_escape_interpolated_argument(arg) } else escaped_args = Array(args).map { |arg| html_escape_interpolated_argument(arg) } end self.class.new(super(escaped_args)) end
*(*) Link
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 215 def *(*) new_string = super new_safe_buffer = new_string.is_a?(SafeBuffer) ? new_string : SafeBuffer.new(new_string) new_safe_buffer.instance_variable_set(:@html_safe, @html_safe) new_safe_buffer end
+(other) Link
[](*args) Link
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 153 def [](*args) if html_safe? new_string = super return unless new_string new_safe_buffer = new_string.is_a?(SafeBuffer) ? new_string : SafeBuffer.new(new_string) new_safe_buffer.instance_variable_set :@html_safe, true new_safe_buffer else to_str[*args] end end