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}"
精彩评论