class AWS::EC2::AttachmentCollection
Represents the collection of attachments for an Amazon EBS volume.
@see Volume
Attributes
volume[R]
Public Class Methods
new(volume, options = {})
click to toggle source
@api private
Calls superclass method
AWS::Core::Model.new
# File lib/aws/ec2/attachment_collection.rb, line 29 def initialize volume, options = {} @volume = volume super end
Public Instance Methods
each() { |attachment| ... }
click to toggle source
@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