# File lib/whois/record/parser/scanners/iana.rb, line 38 def parse_section if @input.scan(/^(.+):(.+)\n/) # Adapt the section's name depending on the first line section = case @input[1].strip when 'contact' @input[2].strip # use the contact type name as identifier when 'created', 'changed' 'dates' when 'nserver' 'nameservers' else @input[1].strip # Default name is the first label found end content = parse_section_pairs @input.match?(/\n+/) || error("Unexpected end of section") @ast[section] = content end end