frozen string yeah

This commit is contained in:
Jamil Bou Kheir
2022-02-05 20:11:59 -08:00
parent 0340f2dcd3
commit dd0fe57429

View File

@@ -175,7 +175,8 @@ class Firezone
# If the value is a String or Number and the attribute name is attr_name.
# Used to write out environment variables to a file.
def self.environment_variables_from(attributes)
attributes.reduce '' do |str, attr|
acc = ''
attributes.reduce acc do |str, attr|
str << if attr[1].is_a?(String) || attr[1].is_a?(Numeric) || attr[1] == true || attr[1] == false
"export #{attr[0].upcase}=\"#{attr[1]}\"\n"
else