Ruby TTY 是一个 Ruby 用来开发命令行应用的 Gems,示例代码:
shell = TTY::Shell.new shell.ask "What is your name?" do argument :required default 'Piotr' validate /\w+\s\w+/ valid ['Piotr', 'Piotrek'] modify :capitalize end.read_string