Class: KuberKit::EnvFileReader::EnvFileTempfileCreator
- Defined in:
- lib/kuber_kit/env_file_reader/env_file_tempfile_creator.rb
Instance Method Summary collapse
Instance Method Details
#call(shell, env_file) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/kuber_kit/env_file_reader/env_file_tempfile_creator.rb', line 8 def call(shell, env_file) env_file_hash = reader.read(shell, env_file) env_file_raw = env_file_hash.to_a.map{|k,v| "#{k}=#{v}"}.join("\r\n") temp_file_path = File.join(configs.env_file_compile_dir, env_file.uniq_name) shell.write(temp_file_path, env_file_raw) temp_file_path end |