Sha256: 191304fcb5e314ac36ac381dc2f6325c44a0b16bbac1f3698607b3f5f95ef7f5

Contents?: true

Size: 589 Bytes

Versions: 7

Compression:

Stored size: 589 Bytes

Contents

class Voxel < Fog::Bin
  class << self

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

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

    def services
      Fog::Voxel.services
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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