Method: String#quote
- Defined in:
- lib/libis/tools/extend/string.rb
#quote ⇒ Object
Quote string for command-line use.
28 29 30 |
# File 'lib/libis/tools/extend/string.rb', line 28 def quote '\"' + self.gsub(/"/) { |s| '\\' + s[0] } + '\"' end |