Class: RbVmomi::BasicTypes::KeyValue

Inherits:
Object
  • Object
show all
Defined in:
lib/rbvmomi/basic_types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(k, v) ⇒ KeyValue

Returns a new instance of KeyValue.



395
396
397
398
# File 'lib/rbvmomi/basic_types.rb', line 395

def initialize k, v
  @key = k
  @value = v
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



393
394
395
# File 'lib/rbvmomi/basic_types.rb', line 393

def key
  @key
end

#valueObject

Returns the value of attribute value.



393
394
395
# File 'lib/rbvmomi/basic_types.rb', line 393

def value
  @value
end

Class Method Details

.wsdl_nameObject



392
# File 'lib/rbvmomi/basic_types.rb', line 392

def self.wsdl_name; 'KeyValue' end

Instance Method Details

#[](i) ⇒ Object



400
401
402
403
404
405
# File 'lib/rbvmomi/basic_types.rb', line 400

def [] i
  if i == 0 then @key
  elsif i == 1 then @value
  else raise "invalid index #{i.inspect}"
  end
end