Sha256: 9b5c23c290e6d047b486ee060da13ed7d317df6d9961915e31c8ed648ac83117
Contents?: true
Size: 453 Bytes
Versions: 38
Compression:
Stored size: 453 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')}.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
38 entries across 38 versions & 4 rubygems