Sha256: 816cd6bc77dcc3a8cd93a71d50a7ee685ea3528e9ff2a8e43eca403008287732

Contents?: true

Size: 512 Bytes

Versions: 1

Compression:

Stored size: 512 Bytes

Contents

require 'rackspace-fog/core/collection'
require 'rackspace-fog/brightbox/models/compute/image'

module Fog
  module Compute
    class Brightbox

      class Images < Fog::Collection

        model Fog::Compute::Brightbox::Image

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

        def get(identifier)
          data = connection.get_image(identifier)
          new(data)
        rescue Excon::Errors::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rackspace-fog-1.4.2 lib/rackspace-fog/brightbox/models/compute/images.rb