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.
368 369 370 371 |
# File 'lib/rbvmomi/basic_types.rb', line 368 def initialize k, v @key = k @value = v end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
366 367 368 |
# File 'lib/rbvmomi/basic_types.rb', line 366 def key @key end |
#value ⇒ Object
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_name ⇒ Object
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 |