Sha256: bba43089b535f6e729b3a96f31e4e0c893ca365a8a65b67cea00c01aeee5b666
Contents?: true
Size: 661 Bytes
Versions: 28
Compression:
Stored size: 661 Bytes
Contents
# Copyright (c) 2011-2017 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: MIT class RbVmomi::VIM::PropertyCollector def collectMultiple objs, *pathSet return {} if objs.empty? klasses = objs.map{|x| x.class}.uniq klass = if klasses.length > 1 # common superclass klasses.map(&:ancestors).inject(&:&)[0] else klasses.first end spec = { :objectSet => objs.map{|x| { :obj => x }}, :propSet => [{ :pathSet => pathSet, :type => klass.wsdl_name }] } res = RetrieveProperties(:specSet => [spec]) Hash[res.map do |x| [x.obj, x.to_hash] end] end end
Version data entries
28 entries across 26 versions & 3 rubygems