Skip to content

Instantly share code, notes, and snippets.

@reinh
Created May 22, 2010 01:49
Show Gist options
  • Save reinh/409676 to your computer and use it in GitHub Desktop.
Save reinh/409676 to your computer and use it in GitHub Desktop.
def run(cmdline=ARGV)
name, *args = cmdline
name &&= name.to_sym
name, *args = :main, name, *args unless COMMANDS[name]
Commandant.call name.to_sym, args.compact
end
module_function :run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment