Class: DJB::TinyDNS::Generic

Inherits:
Resource show all
Defined in:
lib/djb/tinydns.rb

Overview

fqdn, data, ttl, timestamp

Direct Known Subclasses

AAAA, ANY, DNAME, HINFO, ISDN, LOC, MINFO, NAPTR, NSAP, NULL, SRV, WKS

Constant Summary collapse

Sigil =
':'

Instance Attribute Summary collapse

Attributes inherited from Resource

#fqdn, #timestamp, #ttl

Instance Method Summary collapse

Methods inherited from Resource

#encode, #to_s

Constructor Details

#initialize(args) ⇒ Generic

Returns a new instance of Generic.



130
131
132
133
134
135
136
137
138
139
# File 'lib/djb/tinydns.rb', line 130

def initialize(args)
    super(args)
    @data = @args['data']

    @fields << @fqdn
    @fields << (args.has_key?('TypeValue') ? args['TypeValue'] : self.class::TypeValue)
    @fields << encode
    @fields << @ttl
    @fields << @timestamp
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



128
129
130
# File 'lib/djb/tinydns.rb', line 128

def data
  @data
end