Class: IdleMailer::HtmlSafeString
- Inherits:
-
String
- Object
- String
- IdleMailer::HtmlSafeString
- Defined in:
- lib/idlemailer/html_safe_string.rb
Instance Method Summary collapse
Instance Method Details
#<<(str) ⇒ Object
3 4 5 6 |
# File 'lib/idlemailer/html_safe_string.rb', line 3 def <<(str) safe_str = str.is_a?(HtmlSafeString) ? str : ERB::Util.html_escape(str.to_s) super safe_str end |
#safe_concat(val) ⇒ Object
8 9 10 |
# File 'lib/idlemailer/html_safe_string.rb', line 8 def safe_concat(val) self << HtmlSafeString.new(val) end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/idlemailer/html_safe_string.rb', line 12 def to_s self end |