require 'erb' require 'yaml' yaml_data = <<YAML - {name: ParentA, child_name: ChildA, message: A家は塾に通う} - {name: ParentB, child_name: ChildB, message: B家はパパが先生} YAML template = ERB.new <<TEMPLATE, nil, "-" namespace Answer1 { <%- src.each do |clazz| -%> class <%=clazz["name"]%> { public List<<%=clazz["child_name"]%>> Children = new List<<%=clazz["child_name"]%>>(); private static string whereStudy