Class: Fog::Parsers::Terremark::GetOrganizations
- Inherits:
-
Base
- Object
- Nokogiri::XML::SAX::Document
- Base
- Fog::Parsers::Terremark::GetOrganizations
show all
- Defined in:
- lib/fog/terremark/parsers/get_organizations.rb
Instance Attribute Summary
Attributes inherited from Base
#response
Instance Method Summary
collapse
Methods inherited from Base
#characters, #initialize
Instance Method Details
#reset ⇒ Object
7
8
9
|
# File 'lib/fog/terremark/parsers/get_organizations.rb', line 7
def reset
@response = { 'OrgList' => [] }
end
|
#start_element(name, attributes) ⇒ Object
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/fog/terremark/parsers/get_organizations.rb', line 11
def start_element(name, attributes)
@value = ''
if name == 'Org'
organization = {}
until attributes.empty?
organization[attributes.shift] = attributes.shift
end
@response['OrgList'] << organization
end
end
|