Class: Fog::Parsers::Vcloud::GetVersions

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



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/fog/vcloud/parsers/get_versions.rb', line 28

def end_element(name)
  case name
  when "Version"
    @version.version = @value
    @version.supported = @supported
  when "LoginUrl"
    @version. = @value
  when "VersionInfo"
    @response << @version
  when "SupportedVersions"
    @supported = false
  end
end

#resetObject



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

def reset
  @response = []
  @supported = false
end

#start_element(name, attributes = {}) ⇒ Object



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

def start_element(name, attributes = {})
  @value = ''
  case name
  when "Version"
    @version = Struct::VcloudVersion.new
  when "SupportedVersions"
    @supported = true
  end
end