Sha256: c688c7018af4a7bb10b3fc8dbfb82b565460a4007607fc573b31cd06241735e3

Contents?: true

Size: 897 Bytes

Versions: 6

Compression:

Stored size: 897 Bytes

Contents

module Fog
  class DNS

    def self.new(attributes)
      attributes = attributes.dup # prevent delete from having side effects
      case provider = attributes[:provider] # attributes.delete(:provider)
      when 'AWS'
        require 'fog/dns/aws'
        Fog::AWS::DNS.new(attributes)
      when 'Bluebox'
        require 'fog/dns/bluebox'
        Fog::Bluebox::DNS.new(attributes)
      when 'DNSimple'
        require 'fog/dns/dnsimple'
        Fog::DNSimple::DNS.new(attributes)
      when 'Linode'
        require 'fog/dns/linode'
        Fog::Linode::DNS.new(attributes)
      when 'Slicehost'
        require 'fog/dns/slicehost'
        Fog::Slicehost::DNS.new(attributes)
      when 'Zerigo'
        require 'fog/dns/zerigo'
        Fog::Zerigo::DNS.new(attributes)
      else
        raise ArgumentError.new("#{provider} is not a recognized dns provider")
      end
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fog-0.8.2 lib/fog/dns.rb
fog-0.8.1 lib/fog/dns.rb
fog-0.8.0 lib/fog/dns.rb
fog-0.7.2 lib/fog/dns.rb
fog-0.7.1 lib/fog/dns.rb
fog-0.7.0 lib/fog/dns.rb