1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/bluebox/models/images.rb

27 lines
435 B
Ruby
Raw Normal View History

require 'fog/collection'
require 'fog/bluebox/models/image'
module Fog
class Bluebox
2010-06-02 01:01:10 -04:00
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)
2010-06-02 01:01:10 -04:00
new(response.body)
2010-06-02 22:56:50 -04:00
rescue Fog::Bluebox::NotFound
nil
end
end
end
end