Class: Fog::Parsers::Vcloud::Login

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

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#characters, #initialize

Constructor Details

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

Instance Method Details

#resetObject



13
14
15
# File 'lib/fog/vcloud/parsers/login.rb', line 13

def reset
  @response = Struct::VcloudOrgList.new([])
end

#start_element(name, attributes) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/fog/vcloud/parsers/login.rb', line 17

def start_element(name, attributes)
  @value = ''
  case name
  when 'OrgList'
    until attributes.empty?
      if at = attributes.shift
        if at[0] == "xmlns"
          @response.xmlns = at[1]
        end
      end
    end
  when 'Org'
    @response.organizations << generate_link(attributes)
  end
end