Sha256: 868bd0ef8fe140bef747da082d18a4e000feabd589e550d0c59ac44fd63f7d04
Contents?: true
Size: 893 Bytes
Versions: 5
Compression:
Stored size: 893 Bytes
Contents
# frozen_string_literal: true require_relative "base" module Neetob class CLI module Cloudflare class DnsProxyStatus < Base attr_accessor :domain def initialize(domain) super() @domain = domain end def run zone_id = ZONE_IDS[domain.to_sym] raise(StandardError, "Domain '#{domain}' not found.") if zone_id.nil? url = create_url(zone_id, "dns_records") response = get(url) raise(StandardError, "No DNS records found") if response[:result].empty? response[:result].each do |record| if record[:proxiable] ui.info( "DNS proxy is turned #{record[:proxied] ? "on" : "off"} " \ "for #{record[:type]} record #{record[:name]}") end end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems