vendor/bundle/ruby/2.7.0/gems/dnsruby-1.61.5/lib/dnsruby/message/section.rb
#  Return an array of all the rrsets in the section
Return an array of all the rrsets in the section
Return an array of all the rrsets in the section
def rrsets(type = nil, include_opt = false)
    if type && !(Types === type)
      type = Types.new(type)
    end
    ret = []
    each do |rr|
      next if (!include_opt && (rr.type == Types::OPT))
      if (type)
        if rr.type == Types::RRSIG
          if (rr.type_covered == type) || (type == Types::RRSIG)
          else
            next
          end
        elsif rr.type != type
          next
        end
      end
      found_rrset = false
      ret.each do |rrset|
        found_rrset = rrset.add(rr)
        break if found_rrset
      end
      unless found_rrset
        ret.push(RRSet.new(rr))
      end
    end
    ret
  end
def rrsets ( type = nil , include_opt = false ) if type && ! ( Types === type ) type = Types . new ( type ) end ret = [ ] each do | rr | next if ( ! include_opt && ( rr . type == Types :: OPT ) ) if ( type ) if rr . type == Types :: RRSIG if ( rr . type_covered == type ) || ( type == Types :: RRSIG ) else next end elsif rr . type != type next end end found_rrset = false ret . each do | rrset | found_rrset = rrset . add ( rr ) break if found_rrset end unless found_rrset ret . push ( RRSet . new ( rr ) ) end end ret end
Return an array of all the rrsets in the section
Return an array of all the rrsets in the section
#           if (type) #             next if ((rr.type == Types.RRSIG) && (type != Types.RRSIG) && (rr.type_covered != type)) #             next if (rr.type != type) #           end #  if this is an rrsig type, then : #     only include it if the type_covered is the type requested, #     OR if the type requested is an RRSIG #               next if ((rr.type_covered != type) || (type != Types.RRSIG))
type
<not_specific>
include_opt
<not_specific>