<commit_before># encoding: UTF-8

module Cucumber
  module Core
    module Test
      module Result

        # Defines to_sym on a result class for the given status symbol
        #
        # Defines predicate methods on a result class with only the given one
        # returning true
        def self.query_methods(status_symbol)
          Module.new do
            define_method :to_sym do
              status_symbol
            end

            [:passed, :failed, :undefined, :unknown, :skipped, :pending].each do |possible_status|
              define_method("#{possible_status}?") do
                possible_status == to_sym
              end
            end
          end
        end

        # Null object for results. Represents the state where we haven't run anything yet
        class Unknown
          include Result.query_methods :unknown

          def describe_to(visitor, *args)
            self
          end
        end

        class Passed
          include Result.query_methods :passed<commit_msg>Change remaining status references to reference result<commit_after># encoding: UTF-8

module Cucumber
  module Core
    module Test
      module Result

        # Defines to_sym on a result class for the given result type
        #
        # Defines predicate methods on a result class with only the given one
        # returning true
        def self.query_methods(result_type)
          Module.new do
            define_method :to_sym do
              result_type
            end

            [:passed, :failed, :undefined, :unknown, :skipped, :pending].each do |possible_result_type|
              define_method("#{possible_result_type}?") do
                possible_result_type == to_sym
              end
            end
          end
        end

        # Null object for results. Represents the state where we haven't run anything yet
        class Unknown
          include Result.query_methods :unknown

          def describe_to(visitor, *args)
            self
          end
        end

        class Passed
          include Result.query_methods :passed
{'fraction_non_alphanumeric': 0.04980842911877394, 'fraction_numerical': 0.0009578544061302681, 'mean_word_length': 1.7378768020969855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5660903', 'n_tokens_mistral': 525, 'n_tokens_neox': 498, 'n_words': 185}