Sha256: 8c4a0f80e41ad73590ba7e2027d7ccb5630daaf11369adba4caf41551944c3b9

Contents?: true

Size: 545 Bytes

Versions: 7

Compression:

Stored size: 545 Bytes

Contents

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

module Fog
  module Compute
    class Ninefold

      class Flavors < Fog::Collection

        model Fog::Compute::Ninefold::Flavor

        def all
          data = connection.list_service_offerings
          load(data)
        end

        def get(identifier)
          data = connection.list_service_offerings(:id => identifier)
          if data.empty?
            nil
          else
            new(data[0])
          end
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/ninefold/flavors.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/ninefold/flavors.rb
fog-0.11.0 lib/fog/compute/models/ninefold/flavors.rb
fog-0.10.0 lib/fog/compute/models/ninefold/flavors.rb
fog4encbs-0.9.0.1 lib/fog/compute/models/ninefold/flavors.rb
fog4encbs-0.9.0 lib/fog/compute/models/ninefold/flavors.rb
fog-0.9.0 lib/fog/compute/models/ninefold/flavors.rb