instance method
[]
Ruby on Rails 4.0.13
Since v3.0.20Signature
[](*args)
No documentation comment.
Parameters
-
argsrest
Source
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 99
def [](*args)
if args.size < 2
super
else
if html_safe?
new_safe_buffer = super
if new_safe_buffer
new_safe_buffer.instance_eval { @html_safe = true }
end
new_safe_buffer
else
to_str[*args]
end
end
end
Defined in activesupport/lib/active_support/core_ext/string/output_safety.rb line 99
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::SafeBuffer