Permalink
Browse files

Re-use :scan_keyvalue tokenizer inside :scan_contact

  • Loading branch information...
weppos committed Jul 3, 2012
1 parent 2b2af42 commit aeb966ba681b988cffadce7862f530d8cd2a32e1
Showing with 3 additions and 7 deletions.
  1. +3 −7 lib/whois/record/scanners/whois.tld.ee.rb
@@ -28,14 +28,10 @@ class WhoisTldEe < Base
tokenizer :scan_contact do
if @input.scan(/contact:\s+(.*)\n/)
- section = @input[1].strip
- content = {}
-
- while @input.scan(/(.*?):\s+(.*?)\n/)
- content[@input[1]] = @input[2]
+ @tmp['_section'] = @input[1].strip
+ while scan_keyvalue
end
-
- @ast[section] = content
+ @tmp.delete('_section')
end
end

0 comments on commit aeb966b

Please sign in to comment.