Class: Pvectl::Models::SnapshotDescription
- Inherits:
-
Object
- Object
- Pvectl::Models::SnapshotDescription
- Defined in:
- lib/pvectl/models/snapshot_description.rb
Overview
Wraps snapshot describe data: target snapshot + siblings for tree building.
Used by the describe command to return rich snapshot data without changing the existing single-model return convention in ResourceService.
Defined Under Namespace
Classes: Entry
Instance Attribute Summary collapse
-
#entries ⇒ Array<Entry>
readonly
Entries per VM/container.
Instance Method Summary collapse
-
#initialize(entries:) ⇒ SnapshotDescription
constructor
A new instance of SnapshotDescription.
-
#single? ⇒ Boolean
Returns true when describing a snapshot from a single VM.
Constructor Details
#initialize(entries:) ⇒ SnapshotDescription
Returns a new instance of SnapshotDescription.
27 28 29 |
# File 'lib/pvectl/models/snapshot_description.rb', line 27 def initialize(entries:) @entries = entries end |
Instance Attribute Details
#entries ⇒ Array<Entry> (readonly)
Returns entries per VM/container.
24 25 26 |
# File 'lib/pvectl/models/snapshot_description.rb', line 24 def entries @entries end |
Instance Method Details
#single? ⇒ Boolean
Returns true when describing a snapshot from a single VM.
34 35 36 |
# File 'lib/pvectl/models/snapshot_description.rb', line 34 def single? entries.length == 1 end |