Guest User

Untitled

a guest
Apr 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. place_array.each do |array|
  2. categories_array= Array.new
  3. place_dict = Hash.new
  4. array.each_with_index do |line, index|
  5. #puts "#{line} #{index}"
  6. #puts "#{line} #{index}"
  7. place_dict[:name] = line if index == 0
  8. place_dict[:address] = line if index == 1
  9. place_dict[:times] = line if index == 2
  10. categories_array << line if (3..20) === index
  11. place_dict[:categories] = categories_array
  12. end
  13. place_pos << place_dict
  14. end
Add Comment
Please, Sign In to add comment