Sha256: 67b7cda6cac6405b200608b25769bd210e4a0b72325d97888a93e5304e84119f

Contents?: true

Size: 601 Bytes

Versions: 9

Compression:

Stored size: 601 Bytes

Contents

class Google < Fog::Bin
  class << self

    def class_for(key)
      case key
      when :storage
        Fog::Google::Storage
      else 
        raise ArgumentError, "Unsupported #{self} service: #{key}"
      end
    end

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

    def services
      Fog::Google.services
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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