Sha256: a92286fdea8e966f5b3dc39b6e6d9247a94416be52d8301759451a2f664939df

Contents?: true

Size: 749 Bytes

Versions: 4

Compression:

Stored size: 749 Bytes

Contents

module Fog
  module Compute
    class DigitalOceanV2
      class Flavors < Fog::Collection
        model Fog::Compute::DigitalOceanV2::Flavor

        # Retrieves flavours (aka. sizes)
        # @return [Fog::Compute::DigitalOceanV2:Flavor]
        # @raise [Fog::Compute::DigitalOceanV2::NotFound] - HTTP 404
        # @raise [Fog::Compute::DigitalOceanV2::BadRequest] - HTTP 400
        # @raise [Fog::Compute::DigitalOceanV2::InternalServerError] - HTTP 500
        # @raise [Fog::Compute::DigitalOceanV2::ServiceError]
        # @see https://developers.digitalocean.com/documentation/v2/#list-all-sizes
        def all(filters = {})
          data = service.list_flavors.body["sizes"]
          load(data)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-1.38.0 lib/fog/digitalocean/models/compute_v2/flavors.rb
fog-1.37.0 lib/fog/digitalocean/models/compute_v2/flavors.rb
fog-1.36.0 lib/fog/digitalocean/models/compute_v2/flavors.rb
fog-1.35.0 lib/fog/digitalocean/models/compute_v2/flavors.rb