# File lib/Dnsruby/resource/resource.rb, line 220
    def <=>(other)
      #      return 1 if ((!other) || !(other.name) || !(other.type))
      #      return -1 if (!@name)
      if (@name.canonical == other.name.canonical)
        if (@type.code == other.type.code)
          return (@rdata <=> other.rdata)
        else
          return @type.code <=> other.type.code
        end
      else
        return @name <=> other.name
      end
    end