开发者

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

开发者 https://www.devze.com 2023-04-09 10:49 出处:网络
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,

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

精彩评论

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