Sha256: 29eada4e60dd0ff0728b7d6901e51cc1b58e1e4de318d2076fb35d5dbe334b6a

Contents?: true

Size: 518 Bytes

Versions: 16

Compression:

Stored size: 518 Bytes

Contents

require 'fog/core/collection'
require 'fog/compute/models/bluebox/flavor'

module Fog
  module Bluebox
    class Compute

      class Flavors < Fog::Collection

        model Fog::Bluebox::Compute::Flavor

        def all
          data = connection.get_products.body
          load(data)
        end

        def get(product_id)
          response = connection.get_product(product_id)
          new(response.body)
        rescue Fog::Bluebox::Compute::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
fog-0.8.2 lib/fog/compute/models/bluebox/flavors.rb
fog-0.8.1 lib/fog/compute/models/bluebox/flavors.rb
fog-0.8.0 lib/fog/compute/models/bluebox/flavors.rb
fog-0.7.2 lib/fog/compute/models/bluebox/flavors.rb
fog-0.7.1 lib/fog/compute/models/bluebox/flavors.rb
fog-0.7.0 lib/fog/compute/models/bluebox/flavors.rb
fog-0.6.0 lib/fog/compute/models/bluebox/flavors.rb
fog-0.5.3 lib/fog/compute/models/bluebox/flavors.rb
fog-0.5.2 lib/fog/compute/models/bluebox/flavors.rb
fog-0.5.1 lib/fog/compute/models/bluebox/flavors.rb
fog-0.5.0 lib/fog/compute/models/bluebox/flavors.rb
phpfog-fog-0.4.1.3 lib/fog/compute/models/bluebox/flavors.rb
phpfog-fog-0.4.1.2 lib/fog/compute/models/bluebox/flavors.rb
phpfog-fog-0.4.1.1 lib/fog/compute/models/bluebox/flavors.rb
phpfog-fog-0.4.1 lib/fog/compute/models/bluebox/flavors.rb
fog-0.4.1 lib/fog/compute/models/bluebox/flavors.rb