I am using a YAML file for configuration in my rails app and a few entries in the file are subsets of future entries, eg –
domain: domain.com
name: jack
email: jack@domain.com
To make this more efficient, is something like this possible in YAML ?
domain: domain.com
name: jack
email: jack@${domain}
YAML has anchors, but you can’t quite use them as variables the way you did in your question. You can get close with a post-processing step. Say your
domains.yamlisThen with
you get