module Dns::CatalogZone::Output

output module

Public Class Methods

create(setting) click to toggle source
# File lib/dns/catalog_zone/output.rb, line 30
def create(setting)
  type = setting.output
  class_name = "Dns::CatalogZone::Output::#{type.ucc}"
  begin
    require "dns/catalog_zone/output/#{type}"
    output = Object.const_get(class_name).new(setting)
  rescue NameError
    raise Dns::CatalogZone::ValidateError, "can't find #{class_name}"
  end
  output
end