Sha256: 722219c1e4beb5c4618482f63911ee5d6b8cde6030c9f6d2f9983f3f21b6b49c
Contents?: true
Size: 692 Bytes
Versions: 17
Compression:
Stored size: 692 Bytes
Contents
module DnsOne; module Backend; class File < Base def initialize file @domain_map = {} load file end def find dom_name @domain_map[dom_name.downcase] end def allow_cache false end private def load file ::File.open(file).each_line do |line| line.strip! domain_name, rec_set_name = line .split(/[,\s]+/) if domain_name and not domain_name.empty? @domain_map[domain_name.strip.downcase] = rec_set_name&.strip || '' else Global.logger.warn "Ignoring #{file} line: #{line}" end end end end; end; end
Version data entries
17 entries across 17 versions & 1 rubygems