Sha256: 229de5c9806e1663a6f895a4a0e8c8cd5f49db62aba4c439160eb9df98615e49

Contents?: true

Size: 597 Bytes

Versions: 7

Compression:

Stored size: 597 Bytes

Contents

class Local < Fog::Bin
  class << self

    def class_for(key)
      case key
      when :storage
        Fog::Local::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 => 'Local')
        else
          raise ArgumentError, "Unrecognized service: #{key.inspect}"
        end
      end
      @@connections[service]
    end

    def services
      Fog::Local.services
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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