Module: Dnsruby::RR::EmptyUpdateData

Defined in:
lib/dnsruby/resource/RR.rb

Overview

RFC 2136 prerequisites and whole-RRset deletes carry no RDATA, including for types whose ordinary records require fields. Keep the familiar typed record while representing this operation separately from an empty value.

Instance Method Summary collapse

Instance Method Details

#data ⇒ Object



290
291
292
# File 'lib/dnsruby/resource/RR.rb', line 290

def data
  ''
end

#encode_rdata(_encoder, _canonical = false) ⇒ Object



298
299
300
301
302
# File 'lib/dnsruby/resource/RR.rb', line 298

def encode_rdata(_encoder, _canonical = false)
  unless ttl == 0 && RR.empty_update_type?(type, klass)
    raise EncodeError, 'Empty UPDATE records require TTL zero and class ANY or NONE'
  end
end

#rdata_to_string ⇒ Object

:nodoc: all



286
287
288
# File 'lib/dnsruby/resource/RR.rb', line 286

def rdata_to_string
  ''
end

#rdlength ⇒ Object



294
295
296
# File 'lib/dnsruby/resource/RR.rb', line 294

def rdlength
  0
end

#validate_decoded_rdata ⇒ Object



304
305
# File 'lib/dnsruby/resource/RR.rb', line 304

def validate_decoded_rdata
end