Class: Awsum::Ec2::Snapshot
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#progress ⇒ Object
readonly
Returns the value of attribute progress.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#volume_id ⇒ Object
readonly
Returns the value of attribute volume_id.
Instance Method Summary collapse
-
#delete ⇒ Object
Delete this Snapshot.
-
#initialize(ec2, id, volume_id, status, start_time, progress) ⇒ Snapshot
constructor
:nodoc:.
- #reload ⇒ Object
Constructor Details
#initialize(ec2, id, volume_id, status, start_time, progress) ⇒ Snapshot
:nodoc:
8 9 10 11 12 13 14 15 |
# File 'lib/awsum/ec2/snapshot.rb', line 8 def initialize(ec2, id, volume_id, status, start_time, progress) #:nodoc: @ec2 = ec2 @id = id @volume_id = volume_id @status = status @start_time = start_time @progress = progress end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/awsum/ec2/snapshot.rb', line 6 def id @id end |
#progress ⇒ Object (readonly)
Returns the value of attribute progress.
6 7 8 |
# File 'lib/awsum/ec2/snapshot.rb', line 6 def progress @progress end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
6 7 8 |
# File 'lib/awsum/ec2/snapshot.rb', line 6 def start_time @start_time end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/awsum/ec2/snapshot.rb', line 6 def status @status end |
#volume_id ⇒ Object (readonly)
Returns the value of attribute volume_id.
6 7 8 |
# File 'lib/awsum/ec2/snapshot.rb', line 6 def volume_id @volume_id end |
Instance Method Details
#delete ⇒ Object
Delete this Snapshot
18 19 20 |
# File 'lib/awsum/ec2/snapshot.rb', line 18 def delete @ec2.delete_snapshot id end |
#reload ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/awsum/ec2/snapshot.rb', line 22 def reload reloaded_snapshot = @ec2.snapshot id @volume_id = reloaded_snapshot.volume_id @status = reloaded_snapshot.status @start_time = reloaded_snapshot.start_time @progress = reloaded_snapshot.progress end |