新手问题 YAML 里的「&」符号表示什么?

artone · October 03, 2012 · Last by search replied at October 03, 2012 · 4739 hits

Settingslogic 这个 gem 项目看到这段:

# config/application.yml defaults: &defaults cool: saweet: nested settings neat_setting: 24 awesome_setting: <%= "Did you know 5 + 5 = #{5 + 5}?" %>

development: <<: *defaults neat_setting: 800

test: <<: *defaults

production: <<: *defaults

是表示变量?用 Google 不知道怎么表示「&」这个符号……

You need to Sign in before reply, if you don't have an account, please Sign up first.