Sha256: 887abbdb45025be79f007f1784f35e7f8b66c03bdd4094150cb9d887fd8e5cb9

Contents?: true

Size: 607 Bytes

Versions: 33

Compression:

Stored size: 607 Bytes

Contents

require 'fog/collection'
require 'fog/bluebox/models/image'

module Fog
  module Bluebox

    module Collections
      def images(attributes = {})
        Fog::Bluebox::Images.new({
          :connection => self
        }.merge!(attributes))
      end
    end

    class Images < Fog::Collection

      model Fog::Bluebox::Image

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

      def get(template_id)
        response = connection.get_template(template_id)
        new(response.body)
      rescue Fog::Bluebox::NotFound
        nil
      end

    end

  end
end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
fog-0.2.30 lib/fog/bluebox/models/images.rb
fog-0.2.28 lib/fog/bluebox/models/images.rb
fog-0.2.27 lib/fog/bluebox/models/images.rb
fog-0.2.26 lib/fog/bluebox/models/images.rb
fog-0.2.25 lib/fog/bluebox/models/images.rb
fog-0.2.24 lib/fog/bluebox/models/images.rb
tecnh-fog-0.2.23.vpc lib/fog/bluebox/models/images.rb
fog-0.2.23 lib/fog/bluebox/models/images.rb
fog-0.2.22 lib/fog/bluebox/models/images.rb
fog-0.2.21 lib/fog/bluebox/models/images.rb
fog-0.2.20 lib/fog/bluebox/models/images.rb
fog-0.2.19 lib/fog/bluebox/models/images.rb
fog-0.2.18 lib/fog/bluebox/models/images.rb
fog-0.2.17 lib/fog/bluebox/models/images.rb
fog-0.2.16 lib/fog/bluebox/models/images.rb
fog-0.2.15 lib/fog/bluebox/models/images.rb
fog-0.2.14 lib/fog/bluebox/models/images.rb
fog-0.2.13 lib/fog/bluebox/models/images.rb
fog-0.2.12 lib/fog/bluebox/models/images.rb
fog-0.2.11 lib/fog/bluebox/models/images.rb