lib/rubber/dns/nettica.rb
def hosts_to_opts(hosts)
        opts = {}
        
        hosts.each do |record|
          opts[:host] ||= record.hostName || ''
          opts[:domain] ||= record.domainName
          opts[:type] ||= record.recordType
          opts[:ttl] ||= record.tTL if record.tTL

          opts[:data] ||= []
          if opts[:type] =~ /MX/i
            opts[:data] << {:priority => record.priority, :value => record.data}
          else
            opts[:data] << record.data
          end
        end

        opts
      end
# multiple hosts with same name/type convert to a single rubber-dns.yml opts format
multiple hosts with same name/type convert to a single rubber-dns.yml opts format
multiple hosts with same name / type convert to a single rubber - dns . yml opts format
def hosts_to_opts(hosts)
        opts = {}
        hosts.each do |record|
          opts[:host] ||= record.hostName || ''
          opts[:domain] ||= record.domainName
          opts[:type] ||= record.recordType
          opts[:ttl] ||= record.tTL if record.tTL
          opts[:data] ||= []
          if opts[:type] =~ /MX/i
            opts[:data] << {:priority => record.priority, :value => record.data}
          else
            opts[:data] << record.data
          end
        end
        opts
      end
def hosts_to_opts ( hosts ) opts = { } hosts . each do | record | opts [ :host ] ||= record . hostName || '' opts [ :domain ] ||= record . domainName opts [ :type ] ||= record . recordType opts [ :ttl ] ||= record . tTL if record . tTL opts [ :data ] ||= [ ] if opts [ :type ] =~ / MX /i opts [ :data ] << { :priority => record . priority , :value => record . data } else opts [ :data ] << record . data end end opts end
multiple hosts with same name/type convert to a single rubber-dns.yml opts format
multiple hosts with same name / type convert to a single rubber - dns . yml opts format
hosts