Skip to content
Snippets Groups Projects
Commit 657bffda authored by Masahiro Nakao's avatar Masahiro Nakao
Browse files

Add misc/read_yml_erb.rb

parent 6b85953c
Branches
# coding: utf-8
require "yaml"
require "erb"
file_path = ARGV[0]
if file_path.nil? || !File.exist?(file_path)
puts "Not found: #{file_path}"
exit 1
end
data = YAML.load(ERB.new(File.read(file_path), trim_mode: '-').result(binding))
puts YAML.dump(data)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment