Represents the collection of attachments for an Amazon EBS volume.
@see Volume
@private
# File lib/aws/ec2/attachment_collection.rb, line 29 def initialize volume, options = {} @volume = volume super end
@yield [attachment] Each attachment of the volume as an
{Attachment} object.
@return [nil]
# File lib/aws/ec2/attachment_collection.rb, line 37 def each &block volume.attachment_set.each do |item| instance = Instance.new(item.instance_id, :config => config) attachment = Attachment.new(self.volume, instance, item.device, :config => config) yield(attachment) end nil end