<commit_before>module Fog
  module Parsers
    module AWS
      module RDS

        class DownloadDBLogFilePortion < Fog::Parsers::Base

          def reset
            @response = { 'DownloadDBLogFilePortionResult' => {}, 'ResponseMetadata' => {} }
          end

          def start_element(name, attrs = [])
            super
          end

          def end_element(name)
            case name
            when 'LogFileData' then @response['DownloadDBLogFilePortionResult'][name] = value
            when 'AdditionalDataPending' then @response['DownloadDBLogFilePortionResult'][name] = value
            when 'Marker' then @response['DownloadDBLogFilePortionResult'][name] = value
            when 'RequestId' then @response['ResponseMetadata'][name] = value
            end
          end
        end
      end
    end
  end
end<commit_msg>More DRY, succinct implementation of tag parsing<commit_after>module Fog
  module Parsers
    module AWS
      module RDS

        class DownloadDBLogFilePortion < Fog::Parsers::Base

          def reset
            @response = { 'DownloadDBLogFilePortionResult' => {}, 'ResponseMetadata' => {} }
          end

          def start_element(name, attrs = [])
            super
          end

          def end_element(name)
            key = (name == 'RequestId') ? 'ResponseMetadata' : 'DownloadDBLogFilePortionResult'
            @response[key][name] = value
          end

        end

      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08636052090472926, 'fraction_numerical': 0.0, 'mean_word_length': 2.0543933054393304, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4622980', 'n_tokens_mistral': 390, 'n_tokens_neox': 392, 'n_words': 95}