class Dns::CatalogZone::Source::File

Public Instance Methods

get() click to toggle source
# File lib/dns/catalog_zone/source/file.rb, line 27
def get
  rrsets = []
  begin
    reader = Dnsruby::ZoneReader.new(@setting.zonename)
    rrsets = reader.process_file(@setting.zonefile)
  rescue
    raise ZonePraseError
  end
  rrsets
end
validate() click to toggle source
Calls superclass method Dns::CatalogZone::Source::Base#validate
# File lib/dns/catalog_zone/source/file.rb, line 38
def validate
  if @setting.zonefile.class != String ||
     !::File.exist?(@setting.zonefile)
    raise Dns::CatalogZone::ValidateError,
          "[#{@setting.name}] zonefile not found"
  end
  super
end