Class: Aebus::VolumeStatus
- Inherits:
-
Object
- Object
- Aebus::VolumeStatus
- Defined in:
- lib/aebus/volume_status.rb
Instance Attribute Summary collapse
-
#delay ⇒ Object
Returns the value of attribute delay.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_backup ⇒ Object
Returns the value of attribute last_backup.
-
#next_backup ⇒ Object
Returns the value of attribute next_backup.
-
#purgeable_snapshot_ids ⇒ Object
Returns the value of attribute purgeable_snapshot_ids.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(volume_id) ⇒ VolumeStatus
constructor
A new instance of VolumeStatus.
- #needs_backup? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(volume_id) ⇒ VolumeStatus
Returns a new instance of VolumeStatus.
7 8 9 |
# File 'lib/aebus/volume_status.rb', line 7 def initialize(volume_id) @id = volume_id end |
Instance Attribute Details
#delay ⇒ Object
Returns the value of attribute delay.
5 6 7 |
# File 'lib/aebus/volume_status.rb', line 5 def delay @delay end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/aebus/volume_status.rb', line 5 def id @id end |
#last_backup ⇒ Object
Returns the value of attribute last_backup.
5 6 7 |
# File 'lib/aebus/volume_status.rb', line 5 def last_backup @last_backup end |
#next_backup ⇒ Object
Returns the value of attribute next_backup.
5 6 7 |
# File 'lib/aebus/volume_status.rb', line 5 def next_backup @next_backup end |
#purgeable_snapshot_ids ⇒ Object
Returns the value of attribute purgeable_snapshot_ids.
5 6 7 |
# File 'lib/aebus/volume_status.rb', line 5 def purgeable_snapshot_ids @purgeable_snapshot_ids end |
#tags ⇒ Object
Returns the value of attribute tags.
5 6 7 |
# File 'lib/aebus/volume_status.rb', line 5 def @tags end |
Instance Method Details
#needs_backup? ⇒ Boolean
11 12 13 |
# File 'lib/aebus/volume_status.rb', line 11 def needs_backup? (!@tags.nil? && (@tags.count > 0)) end |
#to_s ⇒ Object
15 16 17 18 19 |
# File 'lib/aebus/volume_status.rb', line 15 def to_s "Volume: id => #{id}, :last_backup => #{last_backup}, next_backup=> #{next_backup}, needs_backup? => #{needs_backup?}, delay => #{delay}, tags => #{}, purgeable_snapshot => #{purgeable_snapshots}" end |