Sha256: 52580cd5529c4b791c19ad6e8fe66697f35675e711d046a68b36f4d51a4f2ac5

Contents?: true

Size: 645 Bytes

Versions: 7

Compression:

Stored size: 645 Bytes

Contents

class DNSimple < Fog::Bin
  class << self

    def class_for(key)
      case key
      when :dns
        Fog::DNSimple::DNS
      else
        raise ArgumentError, "Unrecognized service: #{key}"
      end
    end

    def [](service)
      @@connections ||= Hash.new do |hash, key|
        hash[key] = case key
                    when :dns
                      Fog::DNS.new(:provider => 'DNSimple')
                    else
                      raise ArgumentError, "Unrecognized service: #{key.inspect}"
                    end
      end
      @@connections[service]
    end

    def services
      Fog::DNSimple.services
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-0.8.2 lib/fog/bin/dnsimple.rb
fog-0.8.1 lib/fog/bin/dnsimple.rb
fog-0.8.0 lib/fog/bin/dnsimple.rb
fog-0.7.2 lib/fog/bin/dnsimple.rb
fog-0.7.1 lib/fog/bin/dnsimple.rb
fog-0.7.0 lib/fog/bin/dnsimple.rb
fog-0.6.0 lib/fog/bin/dnsimple.rb