Sha256: dc235dd6a31581ae3d1308e16359d4b5b1daeae032bc0479bbbfa27a4c84a5cb

Contents?: true

Size: 654 Bytes

Versions: 32

Compression:

Stored size: 654 Bytes

Contents

module Fog
  module Parsers
    module Compute
      module Slicehost

        class GetBackups < Fog::Parsers::Base

          def reset
            @backup = {}
            @response = { 'backups' => [] }
          end

          def end_element(name)
            case name
            when 'backup'
              @response['backups'] << @backup
              @backup = {}
            when 'date'
              @backup[name] = Time.parse(value)
            when 'id', 'slice-id'
              @backup[name] = value.to_i
            when 'name'
              @backup[name] = value
            end
          end

        end

      end
    end
  end
end

Version data entries

32 entries across 32 versions & 8 rubygems

Version Path
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/compute/get_backups.rb
tag-fog-1.0.1 lib/fog/slicehost/parsers/compute/get_backups.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/compute/get_backups.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/compute/get_backups.rb
fog-1.0.0 lib/fog/slicehost/parsers/compute/get_backups.rb
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/parsers/slicehost/get_backups.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/parsers/slicehost/get_backups.rb
fog-0.11.0 lib/fog/compute/parsers/slicehost/get_backups.rb
fog-0.10.0 lib/fog/compute/parsers/slicehost/get_backups.rb
fog4encbs-0.9.0.1 lib/fog/compute/parsers/slicehost/get_backups.rb
fog4encbs-0.9.0 lib/fog/compute/parsers/slicehost/get_backups.rb
fog-0.9.0 lib/fog/compute/parsers/slicehost/get_backups.rb