Sha256: 9a83a2ea0fad4bc5fd482893964acff0b332f1e60270f17f7e5e4ea3972c85fd

Contents?: true

Size: 533 Bytes

Versions: 7

Compression:

Stored size: 533 Bytes

Contents

require 'fog/core/collection'
require 'fog/compute/models/voxel/image'

module Fog
  module Compute
    class Voxel

      class Images < Fog::Collection

        model Fog::Compute::Voxel::Image

        def all
          data = connection.images_list.body['images']
          load(data)
        end

        def get(image_id)
          data = connection.images_list(image_id).body['images']

          if data.empty?
            nil
          else
            new(data.first)
          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/voxel/images.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/voxel/images.rb
fog-0.11.0 lib/fog/compute/models/voxel/images.rb
fog-0.10.0 lib/fog/compute/models/voxel/images.rb
fog4encbs-0.9.0.1 lib/fog/compute/models/voxel/images.rb
fog4encbs-0.9.0 lib/fog/compute/models/voxel/images.rb
fog-0.9.0 lib/fog/compute/models/voxel/images.rb