parsing yml file

Hello RoR developers

I have a .yml file like


  templatename1: template_of_roster.xml   templatename2: template_of_roster1.xml   templatename3: template_of_roster2.xml   templatename3: template_of_roster3.xml

how can I get the template name to selection. I want to use them in selection however that when I delete one of it option names should be decrease.

thank you for any help.