def sorted_records
      # pull out RRs we want to stick near the top
      top_rrs = {}
      top = %w{SOA NS MX SPF TXT}
      top.each { |t| top_rrs[t] = @records.select { |rr| rr.type == t } }

      remaining = @records.reject { |rr| top.include?(rr.type) }

      # sort remaining RRs by type, alphabeticly
      remaining.sort! { |a,b| a.type <=> b.type }

      top_rrs.values.flatten + remaining
    end
def sorted_records
      # pull out RRs we want to stick near the top
      top_rrs = {}
      top = %w{SOA NS MX SPF TXT}
      top.each { |t| top_rrs[t] = @records.select { |rr| rr.type == t } }

      remaining = @records.reject { |rr| top.include?(rr.type) }

      # sort remaining RRs by type, alphabeticly
      remaining.sort! { |a,b| a.type <=> b.type }

      top_rrs.values.flatten + remaining
    end
Records sorted with more important types being at the top.

 @api private