Class: EY::InstanceAPIClient::Snapshot
- Inherits:
-
Object
- Object
- EY::InstanceAPIClient::Snapshot
- Defined in:
- lib/ey_instance_api_client/snapshot.rb
Instance Method Summary collapse
- #created_at ⇒ Object
- #id ⇒ Object
-
#initialize(attributes) ⇒ Snapshot
constructor
A new instance of Snapshot.
- #progress ⇒ Object
- #state ⇒ Object
- #volume ⇒ Object
Constructor Details
#initialize(attributes) ⇒ Snapshot
Returns a new instance of Snapshot.
4 5 6 |
# File 'lib/ey_instance_api_client/snapshot.rb', line 4 def initialize(attributes) @attributes = attributes end |
Instance Method Details
#created_at ⇒ Object
24 25 26 |
# File 'lib/ey_instance_api_client/snapshot.rb', line 24 def created_at Time.parse(@attributes['created_at']) end |
#id ⇒ Object
20 21 22 |
# File 'lib/ey_instance_api_client/snapshot.rb', line 20 def id @attributes['snapshot_id'] end |
#progress ⇒ Object
12 13 14 |
# File 'lib/ey_instance_api_client/snapshot.rb', line 12 def progress @attributes['progress'] end |
#state ⇒ Object
8 9 10 |
# File 'lib/ey_instance_api_client/snapshot.rb', line 8 def state @attributes['state'] end |
#volume ⇒ Object
16 17 18 |
# File 'lib/ey_instance_api_client/snapshot.rb', line 16 def volume @attributes['volume_type'] end |