Sha256: 4b9f3c7ea3379f05a9970cea4d233648c03cb055ac53522c0efadf361c01b90e
Contents?: true
Size: 793 Bytes
Versions: 33
Compression:
Stored size: 793 Bytes
Contents
require 'fog/collection' require 'fog/aws/models/ec2/image' module Fog module AWS module EC2 module Collections def images Fog::AWS::EC2::Images.new(:connection => self) end end class Images < Fog::Collection attribute :image_id model Fog::AWS::EC2::Image def initialize(attributes) @image_id ||= [] super end def all(image_id = @image_id) @image_id = image_id data = connection.describe_images('ImageId' => image_id).body load(data['imagesSet']) end def get(image_id) if image_id all(image_id).first end rescue Fog::Errors::NotFound nil end end end end end
Version data entries
33 entries across 33 versions & 2 rubygems