Module: RbVmomi::BasicTypes::ObjectWithRefAndConnection
- Included in:
- ManagedObject, OpaqueObject
- Defined in:
- lib/rbvmomi/basic_types.rb
Instance Method Summary collapse
- #==(x) ⇒ Object (also: #eql?)
- #_connection ⇒ Object
- #_ref ⇒ Object
- #hash ⇒ Object
- #initialize(connection, ref) ⇒ Object
- #pretty_print(pp) ⇒ Object
- #to_hash ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#==(x) ⇒ Object Also known as: eql?
213 214 215 216 217 |
# File 'lib/rbvmomi/basic_types.rb', line 213 def == x out = x.hash == hash out = (x._connection.instanceUuid == self._connection.instanceUuid) if out && x._connection.host out end |
#_connection ⇒ Object
193 194 195 |
# File 'lib/rbvmomi/basic_types.rb', line 193 def _connection @connection end |
#_ref ⇒ Object
197 198 199 |
# File 'lib/rbvmomi/basic_types.rb', line 197 def _ref @ref end |
#hash ⇒ Object
221 222 223 |
# File 'lib/rbvmomi/basic_types.rb', line 221 def hash [self.class, @ref].hash end |
#initialize(connection, ref) ⇒ Object
186 187 188 189 190 191 |
# File 'lib/rbvmomi/basic_types.rb', line 186 def initialize connection, ref super() @connection = connection @soap = @connection # XXX deprecated @ref = ref end |
#pretty_print(pp) ⇒ Object
209 210 211 |
# File 'lib/rbvmomi/basic_types.rb', line 209 def pretty_print pp pp.text to_s end |
#to_hash ⇒ Object
205 206 207 |
# File 'lib/rbvmomi/basic_types.rb', line 205 def to_hash to_s end |
#to_s ⇒ Object
201 202 203 |
# File 'lib/rbvmomi/basic_types.rb', line 201 def to_s "#{self.class.wsdl_name}(#{@ref.inspect})" end |