module DNSer

Constants

VERSION

Public Class Methods

apply_template(name) { |tpl if tpl| ... } click to toggle source
# File lib/dnser.rb, line 16
def self.apply_template name, &block
  if @templates
    tpl = @templates[name.to_s.downcase.to_sym].dup rescue nil
    yield tpl if tpl if block_given?
    raise Template::Unknown.new(name.to_s.downcase.to_sym), 'Unknown DNS template' unless tpl
    tpl
  end
end
config() click to toggle source
# File lib/dnser.rb, line 25
def self.config
  Config.instance
end
create_template(name, params = {}) click to toggle source
# File lib/dnser.rb, line 11
def self.create_template name, params = {}, &block
  @templates ||= {}
  @templates[name.to_s.downcase.to_sym] = DNSer::Template.new params, &block
end
domain(domain_name, params = {}) click to toggle source
# File lib/dnser.rb, line 7
def self.domain domain_name, params = {} , &block
  Domain.new domain_name, params, &block
end