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.



368
369
370
371
# File 'lib/rbvmomi/basic_types.rb', line 368

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

Instance Attribute Details

#keyObject

Returns the value of attribute key.



366
367
368
# File 'lib/rbvmomi/basic_types.rb', line 366

def key
  @key
end

#valueObject

Returns the value of attribute value.



366
367
368
# File 'lib/rbvmomi/basic_types.rb', line 366

def value
  @value
end

Class Method Details

.wsdl_nameObject



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

def self.wsdl_name; 'KeyValue' end

Instance Method Details

#[](i) ⇒ Object



373
374
375
376
377
378
# File 'lib/rbvmomi/basic_types.rb', line 373

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