Class: RactorDNS::ActiveZone
- Inherits:
-
ActiveZone::Provider
- Object
- ActiveZone::Provider
- RactorDNS::ActiveZone
- Defined in:
- lib/ractor_dns/active_zone.rb
Defined Under Namespace
Classes: Railtie, Zone, ZoneCollection
Instance Attribute Summary collapse
-
#server ⇒ Object
Returns the value of attribute server.
Instance Method Summary collapse
-
#initialize(name: "ns.ractordns.local", ttl: 300, ip: "0.0.0.0", server: nil, port: 8053, cpu_count: 8, zones:) ⇒ ActiveZone
constructor
A new instance of ActiveZone.
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
#server ⇒ Object
Returns the value of attribute server.
2 3 4 |
# File 'lib/ractor_dns/active_zone.rb', line 2 def server @server end |