Class: RactorDNS::ActiveZone

Inherits:
ActiveZone::Provider
  • Object
show all
Defined in:
lib/ractor_dns/active_zone.rb

Defined Under Namespace

Classes: Railtie, Zone, ZoneCollection

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: "ns.ractordns.local", ttl: 300, ip: "0.0.0.0", server: nil, port: 8053, cpu_count: 8, zones:) ⇒ ActiveZone

Returns a new instance of ActiveZone.



3
4
5
6
7
8
9
10
# File 'lib/ractor_dns/active_zone.rb', line 3

def initialize(name: "ns.ractordns.local", ttl: 300, ip: "0.0.0.0", server: nil, port: 8053, cpu_count: 8, zones:)
 @server = server.presence || RactorDNS::Server.new(
   port:,
   authority: [name, ttl, RRs::IN::A.new(ip)], 
   cpu_count:,
   zones:
 )
end

Instance Attribute Details

#serverObject

Returns the value of attribute server.



2
3
4
# File 'lib/ractor_dns/active_zone.rb', line 2

def server
  @server
end