Class: Fog::Parsers::Vcloud::GetOrganization

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/vcloud/parsers/get_organization.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

#end_element(name) ⇒ Object



27
28
29
30
31
# File 'lib/fog/vcloud/parsers/get_organization.rb', line 27

def end_element(name)
  if name == 'Description'
    @response.description = @value
  end
end

#resetObject

Based off of: support.theenterprisecloud.com/kb/default.asp?id=540&Lang=1&SID=

vCloud API Guide v0.9 - Page 26



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

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

#start_element(name, attributes) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/fog/vcloud/parsers/get_organization.rb', line 17

def start_element(name, attributes)
  @value = ''
  case name
  when 'Link'
    @response.links << generate_link(attributes)
  when 'Org'
    handle_root(attributes)
  end
end