vendor/bundle/ruby/2.7.0/gems/dnsruby-1.61.5/lib/dnsruby/message/section.rb
#  Return the rrset of the specified type in this section
Return the rrset of the specified type in this section
Return the rrset of the specified type in this section
def rrset(name, type=Types.A, klass=Classes::IN)
    rrs = select{|rr|
      type_ok = (rr.type==type)
      if rr.type == Types::RRSIG
        type_ok = (rr.type_covered == type)
      end
      unless /\.\z/ =~ name.to_s
        name = name.to_s + '.'
      end
      type_ok && (rr.klass == klass) && (rr.name.to_s(true).downcase == name.to_s().downcase)
    }
    rrset = RRSet.new()
    rrs.each do |rr|
      rrset.add(rr)
    end
    rrset
  end
def rrset ( name , type = Types . A , klass = Classes :: IN ) rrs = select { | rr | type_ok = ( rr . type == type ) if rr . type == Types :: RRSIG type_ok = ( rr . type_covered == type ) end unless / \. \z / =~ name . to_s name = name . to_s + '.' end type_ok && ( rr . klass == klass ) && ( rr . name . to_s ( true ) . downcase == name . to_s ( ) . downcase ) } rrset = RRSet . new ( ) rrs . each do | rr | rrset . add ( rr ) end rrset end
Return the rrset of the specified type in this section
Return the rrset of the specified type in this section
name
<not_specific>
type
<not_specific>
klass
<not_specific>