Class: Fog::Parsers::Vcloud::Terremark::Ecloud::GetPublicIps
- Inherits:
-
Base
- Object
- Nokogiri::XML::SAX::Document
- Base
- Base
- Fog::Parsers::Vcloud::Terremark::Ecloud::GetPublicIps
show all
- Defined in:
- lib/fog/vcloud/terremark/ecloud/parsers/get_public_ips.rb
Instance Attribute Summary
Attributes inherited from Base
#response
Instance Method Summary
collapse
Methods inherited from Base
#characters, #initialize
Instance Method Details
#end_element(name) ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/fog/vcloud/terremark/ecloud/parsers/get_public_ips.rb', line 21
def end_element(name)
case name
when 'Href'
@ip_address[name.downcase] = URI.parse(@value)
when 'Name'
@ip_address[name.downcase] = @value
when 'Id'
@ip_address[name.downcase] = @value.to_i
when 'PublicIPAddress'
@response.links << @ip_address
end
end
|
#reset ⇒ Object
9
10
11
|
# File 'lib/fog/vcloud/terremark/ecloud/parsers/get_public_ips.rb', line 9
def reset
@response = Struct::TmrkEcloudList.new([])
end
|
#start_element(name, attributes) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/fog/vcloud/terremark/ecloud/parsers/get_public_ips.rb', line 13
def start_element(name, attributes)
@value = nil
case name
when 'PublicIPAddress'
@ip_address = Struct::TmrkEcloudPublicIp.new("application/vnd.tmrk.ecloud.publicIp+xml")
end
end
|