Class: AWS::EC2::AttachmentCollection

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/aws/ec2/attachment_collection.rb

Overview

Represents the collection of attachments for an Amazon EBS volume.

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#volumeObject (readonly)

Returns the value of attribute volume.



31
32
33
# File 'lib/aws/ec2/attachment_collection.rb', line 31

def volume
  @volume
end

Instance Method Details

#each {|attachment| ... } ⇒ nil

Yields:

Returns:

  • (nil)


42
43
44
45
46
47
48
49
50
51
52
# File 'lib/aws/ec2/attachment_collection.rb', line 42

def each(&block)
  volume.attachment_set.each do |att|
    instance = Instance.new(att.instance_id, :config => config)
    attachment = Attachment.new(self.volume,
                                instance,
                                att.device,
                                :config => config)
    yield(attachment)
  end
  nil
end