Class: DeltacloudVM::Client::InstanceAddress
- Inherits:
-
Object
- Object
- DeltacloudVM::Client::InstanceAddress
- Defined in:
- lib/deltacloud_vm/client/models/instance_address.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #[](attr) ⇒ Object
-
#initialize(type, value) ⇒ InstanceAddress
constructor
A new instance of InstanceAddress.
- #to_s ⇒ Object
Constructor Details
#initialize(type, value) ⇒ InstanceAddress
Returns a new instance of InstanceAddress.
21 22 23 24 |
# File 'lib/deltacloud_vm/client/models/instance_address.rb', line 21 def initialize(type, value) @type = type @value = value end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
19 20 21 |
# File 'lib/deltacloud_vm/client/models/instance_address.rb', line 19 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
19 20 21 |
# File 'lib/deltacloud_vm/client/models/instance_address.rb', line 19 def value @value end |
Class Method Details
.convert(address_xml_block) ⇒ Object
34 35 36 37 38 |
# File 'lib/deltacloud_vm/client/models/instance_address.rb', line 34 def self.convert(address_xml_block) address_xml_block.map do |addr| new(:ip_address, addr.text) end end |
Instance Method Details
#[](attr) ⇒ Object
26 27 28 |
# File 'lib/deltacloud_vm/client/models/instance_address.rb', line 26 def [](attr) instance_variable_get("@#{attr}") end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/deltacloud_vm/client/models/instance_address.rb', line 30 def to_s @value end |