Sha256: f826c9a2f5df5a9114b1daff7ac1f301abd8201add746b34632ae102618f40e5

Contents?: true

Size: 497 Bytes

Versions: 28

Compression:

Stored size: 497 Bytes

Contents

# Copyright (c) 2011-2017 VMware, Inc.  All Rights Reserved.
# SPDX-License-Identifier: MIT

class RbVmomi::VIM::ObjectContent
  # Represent this ObjectContent as a hash.
  # @return [Hash] A hash from property paths to values.
  def to_hash
    @cached_hash ||= to_hash_uncached
  end

  # Alias for +to_hash[k]+.
  def [](k)
    to_hash[k]
  end

  private

  def to_hash_uncached
    h = {}
    propSet.each do |x|
      fail if h.member? x.name
      h[x.name] = x.val
    end
    h
  end
end

Version data entries

28 entries across 26 versions & 3 rubygems

Version Path
rbvmomi2-3.0.0 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-3.0.0 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-2.4.1 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-2.4.0 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-2.3.1 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-2.3.0 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-2.3.0.beta1 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-2.2.0 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-2.1.2 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-2.1.1 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-2.1.0 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-2.0.1 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-2.0.0 lib/rbvmomi/vim/ObjectContent.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/rbvmomi-1.13.0/lib/rbvmomi/vim/ObjectContent.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/rbvmomi-1.13.0/lib/rbvmomi/vim/ObjectContent.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/rbvmomi-1.13.0/lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-1.13.0 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-1.12.0 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-1.11.7 lib/rbvmomi/vim/ObjectContent.rb
rbvmomi-1.11.6 lib/rbvmomi/vim/ObjectContent.rb