Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/qna_maker/string.rb
Overview
Monkey-patched String method for fixing responses.
Instance Method Summary collapse
-
#normalize ⇒ String
Fixes <, & and other &‘s characters, replaces crlf to lf newlines.
Instance Method Details
#normalize ⇒ String
Fixes <, & and other &‘s characters, replaces crlf to lf newlines.
14 15 16 |
# File 'lib/qna_maker/string.rb', line 14 def normalize CODER.decode(self).gsub(/\r\n?/, "\n") end |