class RbVmomi::BasicTypes::ObjectWithProperties

Attributes

props_desc[RW]

Public Class Methods

find_prop_desc(name) click to toggle source
# File lib/rbvmomi/basic_types.rb, line 48
def find_prop_desc name
  full_props_desc.find { |x| x['name'] == name.to_s }
end
full_props_desc() click to toggle source
# File lib/rbvmomi/basic_types.rb, line 44
def full_props_desc
  @full_props_desc ||= (self == ObjectWithProperties ? [] : superclass.full_props_desc) + props_desc
end
full_props_set() click to toggle source
# File lib/rbvmomi/basic_types.rb, line 40
def full_props_set
  @full_props_set ||= Set.new(full_props_desc.map { |x| x['name'] })
end
init(name=self.name, props=[]) click to toggle source
Calls superclass method RbVmomi::BasicTypes::Base.init
# File lib/rbvmomi/basic_types.rb, line 30
def init name=self.name, props=[]
  super name
  @props_desc = props
  @props_desc.each do |d|
    sym = d['name'].to_sym
    define_method(sym) { _get_property sym }
    define_method(:"#{sym}=") { |x| _set_property sym, x }
  end
end

Public Instance Methods

_get_property(sym) click to toggle source
# File lib/rbvmomi/basic_types.rb, line 53
def _get_property sym
  fail 'unimplemented'
end
_set_property(sym, val) click to toggle source
# File lib/rbvmomi/basic_types.rb, line 57
def _set_property sym, val
  fail 'unimplemented'
end