Class: Opsmgr::Api::ProductManifestResult
- Inherits:
-
Result
- Object
- Result
- Opsmgr::Api::ProductManifestResult
show all
- Defined in:
- lib/opsmgr/api/results.rb
Defined Under Namespace
Classes: Product, Stemcell
Instance Attribute Summary
Attributes inherited from Result
#message
Instance Method Summary
collapse
Methods inherited from Result
#success?
Constructor Details
Returns a new instance of ProductManifestResult.
198
199
200
|
# File 'lib/opsmgr/api/results.rb', line 198
def initialize(manifest_hash)
@manifest_hash = manifest_hash
end
|
Instance Method Details
#releases ⇒ Object
202
203
204
|
# File 'lib/opsmgr/api/results.rb', line 202
def releases
manifest_hash.fetch('releases').map { |h| Product.new(h.fetch('name'), h.fetch('version')) }
end
|
#stemcell ⇒ Object
206
207
208
209
|
# File 'lib/opsmgr/api/results.rb', line 206
def stemcell
stemcell_hash = manifest_hash.fetch('resource_pools').first.fetch('stemcell')
Stemcell.new(stemcell_hash.fetch('name'), stemcell_hash.fetch('version'))
end
|