lib/glare/domain.rb in glare-0.9.0 vs lib/glare/domain.rb in glare-1.0.0

- old
+ new

@@ -5,13 +5,13 @@ class Domain def initialize(client) @client = client end - def register(fqdn, destinations, type, proxied=false) + def register(fqdn, destinations, type, proxied:, ttl:) dns_records = Array(destinations).map do |destination| - DnsRecord.new(type: type, name: fqdn, content: destination, proxied: proxied) + DnsRecord.new(type: type, name: fqdn, content: destination, proxied: proxied, ttl: ttl) end zone = Zone.new(@client, fqdn) Record.register(@client, zone, dns_records) end @@ -30,8 +30,13 @@ def proxied?(fqdn, type) zone = Zone.new(@client, fqdn) records = zone.records(type) records.all_proxied? + end + + def records(fqdn, type) + zone = Zone.new(@client, fqdn) + zone.records(type) end end end