我想以某种方式要求用户说出他们的flickr_id,flickr_apikey和那些东西,但是id'最乐意在我的install命令下这样做,所以它不会因为所有的参数而变成如此长而重的一行。
比如说
$ thor PhotoonRails:install
We're about to install your system.. blaa, blaa, blaa...
We have to know you're Flick ID, get i here http://idgettr.com/
Flickr ID: {here you should type your id}
We also has to know you're flick api key, make one here ...
API Key: {here you should type your key}
字符串
等等?你明白这个想法吗?它能做到吗?
2条答案
按热度按时间oxalkeyp1#
的确可以!
您正在寻找
ask
。一个例子:
字符串
okxuctiv2#
也可以将颜色设置为符号
字符串
Thor的完整可用颜色列表,在这里:http://www.rubydoc.info/github/wycats/thor/Thor/Shell/Color