Module: Ocran::WindowsCommandEscaping

Included in:
InnoSetupScriptBuilder, InnoSetupScriptBuilder, LauncherBatchBuilder
Defined in:
lib/ocran/windows_command_escaping.rb

Class Method Summary collapse

Class Method Details

.escape_double_quotes(s) ⇒ Object



7
8
9
# File 'lib/ocran/windows_command_escaping.rb', line 7

def escape_double_quotes(s)
  s.to_s.gsub('"', '""')
end

.quote_and_escape(s) ⇒ Object



11
12
13
# File 'lib/ocran/windows_command_escaping.rb', line 11

def quote_and_escape(s)
  "\"#{escape_double_quotes(s)}\""
end