This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
# ramos_de_atividade.rb | |
nomes = File.readlines("ramos_de_atividade.txt") | |
File.open("ramos_de_atividade.yaml", "w") do |f| | |
nomes.each_with_index do |nome, i| | |
f.puts "ramo_de_atividade_#{i+1}" | |
f.puts " id: #{i+1}" | |
f.puts " nome: #{nome}\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ramo_de_atividade_1 | |
id: 1 | |
nome: Alimentos e Bebidas | |
ramo_de_atividade_2 | |
id: 2 | |
nome: Arte e Antiguidades | |
ramo_de_atividade_3 | |
id: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alimentos e Bebidas | |
Arte e Antiguidades | |
Artigos Religiosos | |
Assinaturas e Revistas | |
Automóveis e Veículos | |
Bebês e Cia | |
Blu-Ray | |
Brindes / Materiais Promocionais | |
Brinquedos e Games | |
Casa e Decoração |
NewerOlder