开发者

How do i get the input content that follows the rake command

all. How do开发者_JS百科 i get the content that follows the rake command ,

for example, when i type this command in terminal # rake make_file myfile so that it will creates a file named myfile.txt, how do i write this rake task ?

Thanks in advance.


rake task_name some_param will actually try to fire two rake tasks: task_name and some_param unless the parameters are in the format of param=value, in which case the parameter is populated in the ENV constant.

So, rake task_name myfile=/some/file can be read from ENV["myfile"].

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜