Sha256: 100f7a6159145532e702ca986752228629cb1a664ffc684062c47e1b53f63128

Contents?: true

Size: 1.23 KB

Versions: 61

Compression:

Stored size: 1.23 KB

Contents

module Fog
  module Parsers
    module Storage
      module InternetArchive

        class DeleteMultipleObjects < Fog::Parsers::Base

          def reset
            @deleted = { 'Deleted' => {} }
            @error = { 'Error' => {} }
            @response = { 'DeleteResult' => [] }
          end

          def start_element(name, attrs = [])
            super
            case name
            when 'Deleted'
              @in_deleted = true
            end
          end

          def end_element(name)
            case name
            when 'Deleted'
              @response['DeleteResult'] << @deleted
              @deleted = { 'Deleted' => {} }
              @in_deleted = false
            when 'Error'
              @response['DeleteResult'] << @error
              @error = { 'Error' => {} }
            when 'Key', 'VersionId'
              if @in_deleted
                @deleted['Deleted'][name] = value
              else
                @error['Error'][name] = value
              end
            when 'DeleteMarker', 'DeletemarkerVersionId'
              @deleted['Deleted'][name] = value
            when 'Code', 'Message'
              @error['Error'][name] = value
            end
          end

        end

      end
    end
  end
end

Version data entries

61 entries across 61 versions & 6 rubygems

Version Path
fog-1.22.0 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-1.21.0 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-1.20.0 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-1.19.0 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb