# File lib/rbvmomi/basic_types.rb, line 146 def initialize connection, ref super() @connection = connection @soap = @connection # XXX deprecated @ref = ref end
# File lib/rbvmomi/basic_types.rb, line 197 def == x x.class == self.class and x._ref == @ref end
# File lib/rbvmomi/basic_types.rb, line 193 def [] k _get_property k end
# File lib/rbvmomi/basic_types.rb, line 179 def _call method, o={} fail "parameters must be passed as a hash" unless o.is_a? Hash desc = self.class.full_methods_desc[method.to_s] or fail "unknown method" @connection.call method, desc, self, o end
# File lib/rbvmomi/basic_types.rb, line 153 def _connection @connection end
# File lib/rbvmomi/basic_types.rb, line 161 def _get_property sym ret = @connection.propertyCollector.RetrieveProperties(:specSet => [{ :propSet => [{ :type => self.class.wsdl_name, :pathSet => [sym.to_s] }], :objectSet => [{ :obj => self }], }])[0] if ret.propSet.empty? fail if ret.missingSet.empty? raise ret.missingSet[0].fault else ret.propSet[0].val end end
# File lib/rbvmomi/basic_types.rb, line 157 def _ref @ref end
# File lib/rbvmomi/basic_types.rb, line 175 def _set_property sym, val fail 'unimplemented' end
# File lib/rbvmomi/basic_types.rb, line 203 def hash [self.class, @ref].hash end
# File lib/rbvmomi/basic_types.rb, line 189 def pretty_print pp pp.text to_s end
# File lib/rbvmomi/basic_types.rb, line 185 def to_s "#{self.class.wsdl_name}(#{@ref.inspect})" end