Sha256: 8c4810d241412f7b9687b1e00dde4600a9c505b111ca1a27380769decf98367e

Contents?: true

Size: 1.82 KB

Versions: 28

Compression:

Stored size: 1.82 KB

Contents

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

class RbVmomi::VIM::DynamicTypeMgrManagedTypeInfo
  def toRbvmomiTypeHash
    {
      self.wsdlName => {
        'kind' => 'managed',
        'type-id' => self.name,
        'base-type-id' => self.base.first,
        'props' => self.property.map do |prop|
          {
            'name' => prop.name,
            'type-id-ref' => prop.type.gsub("[]", ""),
            'is-array' => (prop.type =~ /\[\]$/) ? true : false,
            'is-optional' => prop.annotation.find{|a| a.name == "optional"} ? true : false,
            'version-id-ref' => prop.version,
          }
        end,
        'methods' => Hash[
          self.method.map do |method|
            result = method.returnTypeInfo

            [method.wsdlName,
             {
               'params' => method.paramTypeInfo.map do |param|
                 {
                   'name' => param.name,
                   'type-id-ref' => param.type.gsub("[]", ""),
                   'is-array' => (param.type =~ /\[\]$/) ? true : false,
                   'is-optional' => param.annotation.find{|a| a.name == "optional"} ? true : false,
                   'version-id-ref' => param.version,
                 }
               end,
               'result' => (
               if result.nil? then
                 nil
               else
                 {
                   'name' => result.name,
                   'type-id-ref' => result.type.gsub("[]", ""),
                   'is-array' => (result.type =~ /\[\]$/) ? true : false,
                   'is-optional' => result.annotation.find{|a| a.name == "optional"} ? true : false,
                   'version-id-ref' => result.version,
                 }
               end)
             }
            ]
          end
        ]
      }
    }
  end
end

Version data entries

28 entries across 26 versions & 3 rubygems

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