Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/hookify/helpers.rb

Instance Method Summary collapse

Instance Method Details

#shellescapeObject



41
42
43
# File 'lib/hookify/helpers.rb', line 41

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