Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 buildr,我正在尝试将我的所有命令行参数打印到标准输出。我一直无法找到有关 buildr 或 rake(构建器是从哪个构建器构建的)的打印功能的大量文档。我已经有以下内容:
print('IP 地址的服务器' + SERVER)
其中 SERVER 是我从中存储命令行参数的变量。问题是我希望它在自己的行中,并在 SERVER 之后添加一个 '\n' 似乎没有做任何事情。有人知道最好的方法吗?
我想到了。使用 puts 而不是 print,如下所示。
将“服务器位于 IP 地址 #{SERVER}”