Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/appsendr/helpers.rb,
lib/appsendr/commands/base.rb

Instance Method Summary collapse

Instance Method Details

#cl_escapeObject



4
5
6
# File 'lib/appsendr/commands/base.rb', line 4

def cl_escape
	self.gsub('&','\\\\&').gsub(" ","\\ ")
end

#shellescapeObject



140
141
142
# File 'lib/appsendr/helpers.rb', line 140

def shellescape
  empty? ? "''" : gsub(/([^A-Za-z0-9_\-.,:\/@\n])/n, '\\\\\\1').gsub(/\n/, "'\n'")
end