Sha256: 9390a4b4a70829c1ed4c601846b2d7d1a4d543ae15c649b130e54086dd70f0c1

Contents?: true

Size: 524 Bytes

Versions: 4

Compression:

Stored size: 524 Bytes

Contents

require File.expand_path('../region', __FILE__)

module Fog
  module Compute
    class ProfitBricks
      class Regions < Fog::Collection
        model Fog::Compute::ProfitBricks::Region

        def all()
          load(service.get_all_locations.body["getAllLocationsResponse"])
        end

        def get(id)
          region = service.get_location(id).body["getLocationResponse"]
          Excon::Errors
          new(region)
        rescue Excon::Errors::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
fog-profitbricks-2.0.1 lib/fog/profitbricks/models/compute/regions.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-profitbricks-0.0.5/lib/fog/compute/profit_bricks/models/regions.rb
fog-profitbricks-0.0.5 lib/fog/compute/profit_bricks/models/regions.rb
fog-profitbricks-0.0.4 lib/fog/compute/profit_bricks/models/regions.rb