Method: String#quote

Defined in:
lib/libis/tools/extend/string.rb

#quoteObject

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