class VimHash

Public Class Methods

new(xsiType = nil, vimType = nil) { |self| ... } click to toggle source
Calls superclass method
# File lib/VMwareWebService/VimTypes.rb, line 36
def initialize(xsiType = nil, vimType = nil)
  self.xsiType = xsiType
  self.vimType = vimType
  super()
  self.default = nil
  yield(self) if block_given?
end

Public Instance Methods

each_arg() { |a, self| ... } click to toggle source
# File lib/VMwareWebService/VimTypes.rb, line 44
def each_arg
  raise "No arg map for #{xsiType}" unless (am = VimMappingRegistry.args(xsiType))
  am.each do |a|
    next unless self.key?(a)
    yield(a, self[a])
  end
end
method_missing(sym, *args) click to toggle source
# File lib/VMwareWebService/VimTypes.rb, line 52
def method_missing(sym, *args)
  key = sym.to_s
  if key[-1, 1] == '='
    self[key[0...-1]] = args[0]
  else
    self[key]
  end
end