Election results in the London Borough of Sutton.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

2006parser.rb 333 B

123456789101112131415161718192021
  1. new_ward = true
  2. ARGF.each do |line|
  3. line.chomp!
  4. if line == ''
  5. new_ward = true
  6. next
  7. end
  8. if new_ward
  9. @ward_name = line[0..28].strip
  10. new_ward = false
  11. end
  12. data = []
  13. data << @ward_name
  14. data << line[29..-1].split(/\s{2,}/)
  15. puts data.join "\t"
  16. end