Sha256: 66e255b3216450623f921c1782d9142749100d553fad860834bcfdd9b2c50c3f

Contents?: true

Size: 601 Bytes

Versions: 7

Compression:

Stored size: 601 Bytes

Contents

class GoGrid < Fog::Bin
  class << self

    def class_for(key)
      case key
      when :compute
        Fog::GoGrid::Compute
      else 
        raise ArgumentError, "Unsupported #{self} service: #{key}"
      end
    end

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

    def services
      Fog::GoGrid.services
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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