Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/util.rb
Instance Method Summary collapse
Instance Method Details
#escape ⇒ Object
10 11 12 |
# File 'lib/util.rb', line 10 def escape gsub("\\","\\\\").gsub("\n","\\n") end |
#unescape ⇒ Object
14 15 16 |
# File 'lib/util.rb', line 14 def unescape gsub("\\n","\n").gsub("\\\\","\\") end |