<commit_before>require 'yard/handlers/ruby/base'

module YARD
  module Handlers
    module Ruby
      class PredefineHandler < Base

        handles :predefine, method_call(:predefine)

        def process
          nobj = namespace
          mscope = scope
          name = if statement.type == :scanner
                   statement.jump(:ident, :op, :kw, :const).source
                 elsif statement.call?
                   obj = statement.parameters(false).first

                   case obj.type
                   when :symbol_literal
                     obj.jump(:ident, :op, :kw, :const).source
                   when :string_literal
                     obj.jump(:string_content).source
                   end
                 end

          register MethodObject.new(nobj, name, mscope) do |o|
            o.visibility = :public
            o.source = statement.source
            o.signature = "def #{nobj}.#{name}"
          end
        end

      end<commit_msg>Fixed typo.<commit_after>require 'yard/handlers/ruby/base'

module YARD
  module Handlers
    module Ruby
      class PredefineHandler < Base

        handles :predefine, method_call(:predefine)

        def process
          nobj = namespace
          mscope = scope
          name = if statement.type == :predefine
                   statement.jump(:ident, :op, :kw, :const).source
                 elsif statement.call?
                   obj = statement.parameters(false).first

                   case obj.type
                   when :symbol_literal
                     obj.jump(:ident, :op, :kw, :const).source
                   when :string_literal
                     obj.jump(:string_content).source
                   end
                 end

          register MethodObject.new(nobj, name, mscope) do |o|
            o.visibility = :public
            o.source = statement.source
            o.signature = "def #{nobj}.#{name}"
          end
        end

      end
{'fraction_non_alphanumeric': 0.08418367346938775, 'fraction_numerical': 0.0, 'mean_word_length': 1.3655006031363088, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3747158', 'n_tokens_mistral': 511, 'n_tokens_neox': 487, 'n_words': 122}