SX cap production setup files

This commit is contained in:
Min Zeya Phyo
2019-10-25 12:33:21 +06:30
parent b931ad709d
commit 0be67f4f12
10 changed files with 182 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
# we often want to refer to variables which
# are defined in subsequent stage files. This
# let's us use the {{var}} to represent fetch(:var)
# in strings which are only evaluated at runtime.
def sub_strings(input_string)
output_string = input_string
input_string.scan(/{{(\w*)}}/).each do |var|
output_string.gsub!("{{#{var[0]}}}", fetch(var[0].to_sym))
end
output_string
end