Class: Fog::Parsers::Vcloud::Terremark::Ecloud::GetPublicIp

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/vcloud/terremark/ecloud/parsers/get_public_ip.rb

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#characters, #initialize, #start_element

Constructor Details

This class inherits a constructor from Fog::Parsers::Base

Instance Method Details

#end_element(name) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/fog/vcloud/terremark/ecloud/parsers/get_public_ip.rb', line 13

def end_element(name)
  case name
  when 'Href'
    @response[name.downcase] = URI.parse(@value)
  when 'Name'
    @response[name.downcase] = @value
  when 'Id'
    @response['id'] = @value.to_i
  end
end

#resetObject



9
10
11
# File 'lib/fog/vcloud/terremark/ecloud/parsers/get_public_ip.rb', line 9

def reset
  @response = Struct::TmrkEcloudPublicIp.new("application/vnd.tmrk.ecloud.publicIp+xml")
end