Class: RbVmomi::BasicTypes::KeyValue
- Inherits:
-
Object
- Object
- RbVmomi::BasicTypes::KeyValue
- Defined in:
- lib/rbvmomi/basic_types.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #[](i) ⇒ Object
-
#initialize(k, v) ⇒ KeyValue
constructor
A new instance of KeyValue.
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
#key ⇒ Object
Returns the value of attribute key.
393 394 395 |
# File 'lib/rbvmomi/basic_types.rb', line 393 def key @key end |
#value ⇒ Object
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_name ⇒ Object
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 |