Module: Zonify::RR

Extended by:
RR
Included in:
RR
Defined in:
lib/zonify.rb

Overview

Records are all created with functions in this module, which ensures the necessary SRV prefixes, uniform TTLs and final dots in names.

Instance Method Summary collapse

Instance Method Details

#cname(name, dns, ttl = '100') ⇒ Object



183
184
185
186
# File 'lib/zonify.rb', line 183

def cname(name, dns, ttl='100')
  { :type=>'CNAME', :value=>Zonify.dot_(dns),
    :ttl=>ttl,      :name=>Zonify.dot_(name) }
end

#srv(service, name) ⇒ Object



179
180
181
182
# File 'lib/zonify.rb', line 179

def srv(service, name)
  { :type=>'SRV', :value=>"0 0 0 #{Zonify.dot_(name)}",
    :ttl=>'100',  :name=>"#{Zonify::Resolve::SRV_PREFIX}.#{service}" }
end