Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/share_with/utils.rb
Overview
Monkey patching of the String class.
Instance Method Summary collapse
Instance Method Details
#to_encoded_url_param ⇒ Object
15 16 17 |
# File 'lib/share_with/utils.rb', line 15 def to_encoded_url_param ERB::Util.url_encode(self) end |
#to_escaped_html ⇒ Object
11 12 13 |
# File 'lib/share_with/utils.rb', line 11 def to_escaped_html ERB::Util.html_escape(self) end |
#to_plain_text ⇒ Object
19 20 21 |
# File 'lib/share_with/utils.rb', line 19 def to_plain_text Loofah.fragment(self).text end |