Class: AWS::EC2::AttachmentCollection
- Inherits:
-
Object
- Object
- AWS::EC2::AttachmentCollection
- Includes:
- Core::Model, Enumerable
- Defined in:
- lib/aws/ec2/attachment_collection.rb
Overview
Represents the collection of attachments for an Amazon EBS volume.
Instance Attribute Summary collapse
-
#volume ⇒ Object
readonly
Returns the value of attribute volume.
Attributes included from Core::Model
Instance Method Summary collapse
- #each {|attachment| ... } ⇒ nil
-
#initialize(volume, options = {}) ⇒ AttachmentCollection
constructor
A new instance of AttachmentCollection.
Methods included from Core::Model
#client, #config_prefix, #inspect
Constructor Details
#initialize(volume, options = {}) ⇒ AttachmentCollection
Returns a new instance of AttachmentCollection.
29 30 31 32 |
# File 'lib/aws/ec2/attachment_collection.rb', line 29 def initialize volume, = {} @volume = volume super end |
Instance Attribute Details
#volume ⇒ Object (readonly)
Returns the value of attribute volume.
26 27 28 |
# File 'lib/aws/ec2/attachment_collection.rb', line 26 def volume @volume end |
Instance Method Details
#each {|attachment| ... } ⇒ nil
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/aws/ec2/attachment_collection.rb', line 37 def each &block volume..each do |item| instance = Instance.new(item.instance_id, :config => config) = Attachment.new(self.volume, instance, item.device, :config => config) yield() end nil end |