Sha256: ee080404fc82f712a95ef4b71024800ef6485e239f0144882a11d5d6c6c1a365
Contents?: true
Size: 457 Bytes
Versions: 7
Compression:
Stored size: 457 Bytes
Contents
class ErbHelper def self.convert_erb_template_to_yaml test_namespace, input_erb_config input_erb_config = input_erb_config e = ERB.new(File.open(input_erb_config).read) output_yaml_config = File.join(File.dirname(input_erb_config), "output_#{Time.now.strftime('%s.%6N')}.yaml") File.open(output_yaml_config, 'w') { |f| f.write e.result(OpenStruct.new(test_namespace).instance_eval { binding }) } output_yaml_config end end
Version data entries
7 entries across 7 versions & 1 rubygems