Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/service_mock/core_ext/string.rb

Instance Method Summary collapse

Instance Method Details

#escape_double_quotesObject



7
8
9
# File 'lib/service_mock/core_ext/string.rb', line 7

def escape_double_quotes
  self.gsub('"', "\\\"")
end

#remove_newlinesObject



3
4
5
# File 'lib/service_mock/core_ext/string.rb', line 3

def remove_newlines
  self.gsub("\n", "")
end

#remove_whitespaceObject



11
12
13
# File 'lib/service_mock/core_ext/string.rb', line 11

def remove_whitespace
  self.gsub(/\s/, "")
end