vendor/bundle/ruby/2.7.0/gems/dnsruby-1.61.5/lib/dnsruby/update.rb
# Ways to create the prerequisite records (exists, notexists, inuse, etc. - RFC2136, section 2.4)
#
#       (1)  RRset exists (value independent).  At least one RR with a
#            specified NAME and TYPE (in the zone and class specified by
#            the Zone Section) must exist.
#
#            update.present(name, type)
#
#       (2)  RRset exists (value dependent).  A set of RRs with a
#            specified NAME and TYPE exists and has the same members
#            with the same RDATAs as the RRset specified here in this
#            Section.
#
#            update.present(name, type, rdata)
#
#       (4)  Name is in use.  At least one RR with a specified NAME (in
#            the zone and class specified by the Zone Section) must exist.
#            Note that this prerequisite is NOT satisfied by empty
#            nonterminals.
#
#            update.present(name)
Ways to create the prerequisite records (exists, notexists, inuse, etc. - RFC2136, section 2.4)
(1)  RRset exists (value independent).  At least one RR with a
specified NAME and TYPE (in the zone and class specified by
the Zone Section) must exist.



(2)  RRset exists (value dependent).  A set of RRs with a
specified NAME and TYPE exists and has the same members
with the same RDATAs as the RRset specified here in this
Section.



(4)  Name is in use.  At least one RR with a specified NAME (in
the zone and class specified by the Zone Section) must exist.
Note that this prerequisite is NOT satisfied by empty
nonterminals.


Ways to create the prerequisite records ( exists notexists inuse etc . - RFC2136 section 2 . 4 ) ( 1 ) RRset exists ( value independent ) . At least one RR with a specified NAME and TYPE ( in the zone and class specified by the Zone Section ) must exist . ( 2 ) RRset exists ( value dependent ) . A set of RRs with a specified NAME and TYPE exists and has the same members with the same RDATAs as the RRset specified here in this Section . ( 4 ) Name is in use . At least one RR with a specified NAME ( in the zone and class specified by the Zone Section ) must exist . Note that this prerequisite is NOT satisfied by empty nonterminals .
def present(*args)
      ttl = 0
      rdata = ""
      klass = Classes.ANY
      if (args.length>=1) 
        name = args[0]
        type = Types.ANY
        if (args.length>=2) 
          type = args[1]
        end
        if (args.length > 2) 
          klass = Classes.new(zone()[0].zclass)
          rdata=args[2]
        end
        rec = RR.create("#{name} #{ttl} #{klass} #{type} #{rdata}")
        add_pre(rec)
        return rec
      else
        raise ArgumentError.new("Wrong number of arguments (#{args.length} for 1 or 2) for Update#present")
      end
    end
def present ( * args ) ttl = 0 rdata = "" klass = Classes . ANY if ( args . length >= 1 ) name = args [ 0 ] type = Types . ANY if ( args . length >= 2 ) type = args [ 1 ] end if ( args . length > 2 ) klass = Classes . new ( zone ( ) [ 0 ] . zclass ) rdata = args [ 2 ] end rec = RR . create ( "#{name} #{ttl} #{klass} #{type} #{rdata}" ) add_pre ( rec ) return rec else raise ArgumentError . new ( "Wrong number of arguments (#{args.length} for 1 or 2) for Update#present" ) end end
Ways to create the prerequisite records (exists, notexists, inuse, etc.
Ways to create the prerequisite records ( exists notexists inuse etc .
# domain (RFC2136, Section 2.4.4) # RRSET (RFC2136, Section 2.4.1) # RRSET (RFC2136, Section 2.4.2)
args
<not_specific>