Sha256: 965399bbc0c0315a01caaad3af6ffa462ef80258636c16ceb306383d1020bf21

Contents?: true

Size: 652 Bytes

Versions: 7

Compression:

Stored size: 652 Bytes

Contents

class Brightbox < Fog::Bin
  class << self

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

    def services
      [:compute]
    end

    def account
      @@connections[:compute].account
    end

  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

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