lib/rubber/dns/zerigo.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|
          host = {}
          host[:name] = opts[:host]
          host[:type] =  opts[:type]
          host[:ttl] = opts[:ttl] if opts[:ttl]
          if o.kind_of?(Hash) && o[:priority]
            host[:priority] = o[:priority]
            host[:value] = o[:value]
          else
            host[:value] = o
          end
          hosts << host
        end
        hosts
      end
def opts_to_hosts ( opts ) hosts = [ ] opts [ :data ] . each do | o | host = { } host [ :name ] = opts [ :host ] host [ :type ] = opts [ :type ] host [ :ttl ] = opts [ :ttl ] if opts [ :ttl ] if o . kind_of? ( Hash ) && o [ :priority ] host [ :priority ] = o [ :priority ] host [ :value ] = o [ :value ] else host [ :value ] = o end 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