Class: Opsmgr::Api::ListProductsResult

Inherits:
Result
  • Object
show all
Defined in:
lib/opsmgr/api/results.rb

Defined Under Namespace

Classes: Product

Instance Attribute Summary collapse

Attributes inherited from Result

#message

Instance Method Summary collapse

Methods inherited from Result

#success?

Constructor Details

#initialize(product_hash_array) ⇒ ListProductsResult

Returns a new instance of ListProductsResult.



79
80
81
# File 'lib/opsmgr/api/results.rb', line 79

def initialize(product_hash_array)
  @products = product_hash_array.map { |p| Product.new(p.fetch('name'), p.fetch('product_version')) }
end

Instance Attribute Details

#productsObject (readonly)

Returns the value of attribute products.



77
78
79
# File 'lib/opsmgr/api/results.rb', line 77

def products
  @products
end