Method: String#escape_for_string

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

#escape_for_stringObject

Escape double quotes for usage in code strings.



38
39
40
# File 'lib/libis/tools/extend/string.rb', line 38

def escape_for_string
  self.gsub(/"/) { |s| '\\' + s[0].to_s }
end