Class: ActiveSupport::SafeBuffer
- Inherits:
-
String
- Object
- String
- ActiveSupport::SafeBuffer
- Defined in:
- lib/ckeditor/safe_buffer.rb
Instance Method Summary collapse
- #+(other) ⇒ Object
- #concat(value) ⇒ Object (also: #<<)
- #html_safe ⇒ Object
- #html_safe? ⇒ Boolean
- #safe_concat ⇒ Object
- #to_s ⇒ Object
- #to_yaml(*args) ⇒ Object
Instance Method Details
#+(other) ⇒ Object
14 15 16 |
# File 'lib/ckeditor/safe_buffer.rb', line 14 def +(other) dup.concat(other) end |
#concat(value) ⇒ Object Also known as: <<
5 6 7 8 9 10 11 |
# File 'lib/ckeditor/safe_buffer.rb', line 5 def concat(value) if value.html_safe? super(value) else super(ERB::Util.h(value)) end end |
#html_safe ⇒ Object
22 23 24 |
# File 'lib/ckeditor/safe_buffer.rb', line 22 def html_safe self end |
#html_safe? ⇒ Boolean
18 19 20 |
# File 'lib/ckeditor/safe_buffer.rb', line 18 def html_safe? true end |
#safe_concat ⇒ Object
3 |
# File 'lib/ckeditor/safe_buffer.rb', line 3 alias safe_concat concat |
#to_s ⇒ Object
26 27 28 |
# File 'lib/ckeditor/safe_buffer.rb', line 26 def to_s self end |
#to_yaml(*args) ⇒ Object
30 31 32 |
# File 'lib/ckeditor/safe_buffer.rb', line 30 def to_yaml(*args) to_str.to_yaml(*args) end |