【发布时间】:2014-12-18 17:40:17
【问题描述】:
在 capistrano 2.15.5 deploy:assets source 中,我看到如下代码:
desc <<-DESC
[internal] This task will set up a symlink to the shared directory \
... more
DESC
run <<-CMD.compact
rm -rf #{latest_release}/public/#{assets_prefix} &&
... more
CMD
这个语法到底发生了什么?它看起来像是一种编写不带引号的字符串的方法,类似于 %q。 <<- 是运营商吗?还是 <<-CMD 和 <<-DESC 奇怪命名的常量?或者这在普通 Ruby 中没有任何意义,而是 Capistrano DSL 的一个特性?
【问题讨论】:
标签: ruby-on-rails ruby capistrano