I want to avoid a ton of boilerplate/copying and pasting, and the way the database schema is structured with tables, foreign keys, etc., I ought to be able to do something like this:
#simplified example
<% ["offense", "defense", "special_teams"].map do |position|%>
home_<%=position%>_player:
game: 1
team: buckeyes
player: home_<%=position%>_player #uses fixture label for association
division: northeast
season: "2015"
<%=position%>_stat: home_<%=position%>_stat #uses fixture label for association
away_<%=position%>_player:
game: 1
team: hokies
player: away_<%=position%>_player
division: southeast
season: "2015"
<%=position%>_stat: away_<%=position%>_stat
<% end %>
I've tried loading this in an IRB session to no avail though. The exception was
Psych::SyntaxError: (<unknown>): mapping values are not allowed in this context at line 5 column 26
which makes me wonder if what I'm doing is valid YAML.