开发者

Print new line with rake/buildr

开发者 https://www.devze.com 2023-03-16 20:23 出处:网络
I am using buildr and I am trying to print all of my command line arguments to standard out. I have been unable to find much documentation on the print function for buildr or for rake (which buildr wa

I am using buildr and I am trying to print all of my command line arguments to standard out. I have been unable to find much documentation on the print function for buildr or for rake (which buildr was built from). I already开发者_如何转开发 have the following:

print('Server at ip address' + SERVER)

where SERVER is the variable I store the command line argument from. The problem is that I want it on its own line and adding a '\n' after SERVER doesn't seem to do anything. Anyone know the best way to do this?


I figured it out. Use puts instead of print as follows.

puts "Server at ip address #{SERVER}"

0

精彩评论

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