Class: DJB::TinyDNS::NS::Base

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

Direct Known Subclasses

DelegateFrom, DelegateTo

Constant Summary collapse

TypeValue =
2

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) ⇒ Base

Returns a new instance of Base.



168
169
170
171
172
173
174
175
176
177
178
# File 'lib/djb/tinydns.rb', line 168

def initialize(args)
    super(args)
    @ip   = @args['ip']
    @host = @args['host']

    @fields << @fqdn
    @fields << @ip
    @fields << @host
    @fields << @ttl
    @fields << @timestamp
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



166
167
168
# File 'lib/djb/tinydns.rb', line 166

def host
  @host
end

#ipObject (readonly)

Returns the value of attribute ip.



166
167
168
# File 'lib/djb/tinydns.rb', line 166

def ip
  @ip
end