Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/u3d_core/core_ext/string.rb,
lib/u3d_core/ui/disable_colors.rb

Instance Method Summary collapse

Instance Method Details

#argescapeObject

a crossplatform version of shellescape



29
30
31
32
33
34
35
36
# File 'lib/u3d_core/core_ext/string.rb', line 29

def argescape
  if U3dCore::Helper.windows?
    self =~ / / ? "\"#{self}\"" : self
  else
    require 'shellwords'
    Shellwords.escape(self)
  end
end