class RbVmomi::BasicTypes::ObjectWithProperties
Attributes
Public Class Methods
Source
# File lib/rbvmomi/basic_types.rb, line 50 def find_prop_desc name full_props_desc.find { |x| x['name'] == name.to_s } end
Source
# File lib/rbvmomi/basic_types.rb, line 46 def full_props_desc @full_props_desc ||= (self == ObjectWithProperties ? [] : superclass.full_props_desc) + props_desc end
Source
# File lib/rbvmomi/basic_types.rb, line 42 def full_props_set @full_props_set ||= Set.new(full_props_desc.map { |x| x['name'] }) end
Source
# File lib/rbvmomi/basic_types.rb, line 32 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
Calls superclass method
RbVmomi::BasicTypes::Base::init
Public Instance Methods
Source
# File lib/rbvmomi/basic_types.rb, line 55 def _get_property sym fail 'unimplemented' end
Source
# File lib/rbvmomi/basic_types.rb, line 59 def _set_property sym, val fail 'unimplemented' end