Sha256: c8a659d9b055aeae72439486098d11be3a5949b1d4b9a2669384e1fdbeb86b54

Contents?: true

Size: 498 Bytes

Versions: 111

Compression:

Stored size: 498 Bytes

Contents

module Fog
  module Parsers
    module Slicehost

      class GetImages < Fog::Parsers::Base

        def reset
          @image = {}
          @response = { 'images' => [] }
        end

        def end_element(name)
          case name
          when 'id'
            @image[name] = @value.to_i
          when 'image'
            @response['images'] << @image
            @image = {}
          when 'name'
            @image[name] = @value
          end
        end

      end

    end
  end
end

Version data entries

111 entries across 111 versions & 2 rubygems

Version Path
fog-0.2.30 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.28 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.27 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.26 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.25 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.24 lib/fog/slicehost/parsers/get_images.rb
tecnh-fog-0.2.23.vpc lib/fog/slicehost/parsers/get_images.rb
fog-0.2.23 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.22 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.21 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.20 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.19 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.18 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.17 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.16 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.15 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.14 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.13 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.12 lib/fog/slicehost/parsers/get_images.rb
fog-0.2.11 lib/fog/slicehost/parsers/get_images.rb