lib/glare/domain.rb in glare-0.6.0 vs lib/glare/domain.rb in glare-0.7.0

- old
+ new

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