# File lib/Dnsruby/resource/resource.rb, line 29
    def add(r)
      if @rrs.include?r
        return false
      end
      if (rrs.size() == 0)
        @rrs.push(r)
        return;
      end
      # Check the type, klass and ttl are correct
      first = @rrs[0]
      if (!r.sameRRset(first))
        raise ArgumentError.new("record does not match rrset")
      end
      
      if (r.ttl != first.ttl) # RFC2181, section 5.2
        if (r.ttl > first.ttl)
          #          r = r.cloneRecord();
          r.ttl=(first.ttl);
        else
          @rrs.each do |rr|
            rr.ttl = r.ttl
          end
        end
      end
      
      if (!rrs.contains(r))
        @rrs.push(r)
      end
    end