class Fog::Parsers::Compute::Voxel::ImagesList
Public Instance Methods
end_element(name)
click to toggle source
# File lib/fog/parsers/compute/voxel/images_list.rb, line 34 def end_element(name) case name when "architecture" @image["operating_system"][name] = value.to_i when "admin_username", "family", "product_family", "product_version", "version" @image["operating_system"][name] = value when "description" @image[name] = value when "image" @response["images"] << @image @image = {} when "size" @image["filesystem"][name] = value.to_i when "type" @image["filesystem"][name] = value end end
reset()
click to toggle source
# File lib/fog/parsers/compute/voxel/images_list.rb, line 6 def reset @image = {} @response = { "images" => [] } end
start_element(name, attrs = [])
click to toggle source
Calls superclass method
# File lib/fog/parsers/compute/voxel/images_list.rb, line 11 def start_element(name, attrs = []) super case name when "err" @response["err"] = { "code" => attr_value("code", attrs), "msg" => attr_value("msg", attrs) } when "size" @image["filesystem"]["units"] = attr_value("units", attrs) when "image" @image = { "id" => attr_value("id", attrs).to_i, "summary" => attr_value("summary", attrs) } when "filesystem", "operating_system" @image[name] = {} when "rsp" @response["stat"] = attr_value("stat", attrs) end end