Class: Fog::Parsers::Vcloud::Terremark::Vcloud::GetVdc
- Inherits:
-
Base
- Object
- Nokogiri::XML::SAX::Document
- Base
- Base
- Fog::Parsers::Vcloud::Terremark::Vcloud::GetVdc
show all
- Defined in:
- lib/fog/vcloud/terremark/vcloud/parsers/get_vdc.rb
Instance Attribute Summary
Attributes inherited from Base
#response
Instance Method Summary
collapse
Methods inherited from Base
#characters, #initialize
Instance Method Details
#reset ⇒ Object
9
10
11
12
|
# File 'lib/fog/vcloud/terremark/vcloud/parsers/get_vdc.rb', line 9
def reset
@target = nil
@response = Struct::TmrkVcloudVdc.new([],[],[])
end
|
#start_element(name, attributes) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/fog/vcloud/terremark/vcloud/parsers/get_vdc.rb', line 14
def start_element(name, attributes)
@value = ''
case name
when 'Link'
@response.links << generate_link(attributes)
when 'Network'
@response.networks << generate_link(attributes)
when 'ResourceEntity'
@response.resource_entities << generate_link(attributes)
when 'Vdc'
handle_root(attributes)
end
end
|