lib/rubber/dns/nettica.rb
# a single rubber-dns.yml opts format converts to multiple hosts with same name/type 
a single rubber-dns.yml opts format converts to multiple hosts with same name/type
a single rubber - dns . yml opts format converts to multiple hosts with same name / type
def opts_to_hosts(opts)
        hosts = []
        opts[:data].each do |o|
          data, priority = nil, 0
          if o.kind_of?(Hash) && o[:priority]
            priority = o[:priority]
            data = o[:value]
          else
            data = o
          end
          host = @client.create_domain_record(opts[:domain],
                                              opts[:host],
                                              opts[:type],
                                              data,
                                              opts[:ttl],
                                              priority)
          hosts << host
        end
        hosts
      end
def opts_to_hosts ( opts ) hosts = [ ] opts [ :data ] . each do | o | data , priority = nil , 0 if o . kind_of? ( Hash ) && o [ :priority ] priority = o [ :priority ] data = o [ :value ] else data = o end host = @client . create_domain_record ( opts [ :domain ] , opts [ :host ] , opts [ :type ] , data , opts [ :ttl ] , priority ) hosts << host end hosts end
a single rubber-dns.yml opts format converts to multiple hosts with same name/type
a single rubber - dns . yml opts format converts to multiple hosts with same name / type
opts