Skip to content

Instantly share code, notes, and snippets.

@fabianofranz
Created November 26, 2012 23:05
Show Gist options
  • Save fabianofranz/4151264 to your computer and use it in GitHub Desktop.
Save fabianofranz/4151264 to your computer and use it in GitHub Desktop.
def get_args
ARGV.shift
args = ""
ARGV.each do|a|
if ( a.to_s.strip.length == 0 || a.to_s.strip.match(/\s/) ); a = "'#{a}'" end
args += " #{a}"
end
args
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment