Sha256: 1849caaceaa67fd6c5761a84b081441c303e35e5e805bd02f9a599f796f8ad6b

Contents?: true

Size: 587 Bytes

Versions: 7

Compression:

Stored size: 587 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: #{service}"
        end
      end
      @@connections[service]
    end

    def services
      [:storage]
    end

  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fog-0.5.1 lib/fog/bin/google.rb
fog-0.5.0 lib/fog/bin/google.rb
phpfog-fog-0.4.1.3 lib/fog/bin/google.rb
phpfog-fog-0.4.1.2 lib/fog/bin/google.rb
phpfog-fog-0.4.1.1 lib/fog/bin/google.rb
phpfog-fog-0.4.1 lib/fog/bin/google.rb
fog-0.4.1 lib/fog/bin/google.rb