Sha256: 5d2a21204c501d631fe3a98f8b2cd0898d616f768dfc059d06c1a85a1121a216

Contents?: true

Size: 563 Bytes

Versions: 50

Compression:

Stored size: 563 Bytes

Contents

module Fog
  module Parsers
    module Slicehost
      module Compute

        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
end

Version data entries

50 entries across 50 versions & 3 rubygems

Version Path
fog-0.7.2 lib/fog/compute/parsers/slicehost/get_images.rb
fog-0.7.1 lib/fog/compute/parsers/slicehost/get_images.rb
fog-0.7.0 lib/fog/compute/parsers/slicehost/get_images.rb
fog-0.6.0 lib/fog/compute/parsers/slicehost/get_images.rb
fog-0.5.3 lib/fog/compute/parsers/slicehost/get_images.rb
fog-0.5.2 lib/fog/compute/parsers/slicehost/get_images.rb
fog-0.5.1 lib/fog/compute/parsers/slicehost/get_images.rb
fog-0.5.0 lib/fog/compute/parsers/slicehost/get_images.rb
phpfog-fog-0.4.1.3 lib/fog/compute/parsers/slicehost/get_images.rb
phpfog-fog-0.4.1.2 lib/fog/compute/parsers/slicehost/get_images.rb
phpfog-fog-0.4.1.1 lib/fog/compute/parsers/slicehost/get_images.rb
phpfog-fog-0.4.1 lib/fog/compute/parsers/slicehost/get_images.rb
fog-0.4.1 lib/fog/compute/parsers/slicehost/get_images.rb
fog-0.4.0 lib/fog/slicehost/parsers/compute/get_images.rb
fog-0.3.34 lib/fog/slicehost/parsers/compute/get_images.rb
fog-0.3.33 lib/fog/slicehost/parsers/compute/get_images.rb
fog-0.3.32 lib/fog/slicehost/parsers/compute/get_images.rb
fog-0.3.31 lib/fog/slicehost/parsers/compute/get_images.rb
fog-0.3.30 lib/fog/slicehost/parsers/compute/get_images.rb
fog-0.3.29 lib/fog/slicehost/parsers/compute/get_images.rb