Class: ReDNS::Record::Null

Inherits:
Fragment show all
Defined in:
lib/redns/record/null.rb

Instance Attribute Summary

Attributes inherited from Fragment

#attributes

Instance Method Summary collapse

Methods inherited from Fragment

attribute, #initialize

Methods included from Support

#addr_to_arpa, #bind_all_addr, #default_nameservers, #default_resolver_address, #dns_port, #inet_aton, #inet_ntoa, #io_nonblock, #io_nonblock?, #io_set_nonblock, #is_ip?

Constructor Details

This class inherits a constructor from ReDNS::Fragment

Instance Method Details

#deserialize(buffer) ⇒ Object



24
25
26
27
28
29
# File 'lib/redns/record/null.rb', line 24

def deserialize(buffer)
  self.contents = buffer.to_s
  buffer.advance(self.contents.length)

  self
end

#serialize(buffer = ReDNS::Buffer.new) ⇒ Object



18
19
20
21
22
# File 'lib/redns/record/null.rb', line 18

def serialize(buffer = ReDNS::Buffer.new)
  buffer.append(self.contents)

  buffer
end

#to_aObject



14
15
16
# File 'lib/redns/record/null.rb', line 14

def to_a
	[ self.contents ]
end

#to_sObject

Instance Methods =====================================================



10
11
12
# File 'lib/redns/record/null.rb', line 10

def to_s
	"#{self.contents}"
end