I'm trying to improve my YAML file for my Vagrant project. According to this post, if I have something like this:
en:
site_name: "Site Name"
static_pages:
company:
description: ! '%{site_name} is an online system'
I should be able to print "Site Name is an online system"
, but I don't know how to use it inside my Vagrantfile
.
I tried so far but I couldn't print it out properly, just this:
%{site_name} is an online system
This is how I'm using it:
require 'yaml'
set = YAML.load_file(ENV['DEVOPS_HOME'] + '/vagrant/server/settings.yml')
puts set['en']['static_pages']['company']['description']