<commit_before>module Shiritori
  module SearchMethod
    UNUSE_METHOD = [:exit]

    def get_all_method
      @check_list = {}
      @method_list = scan_methods

      @method_list - UNUSE_METHOD
    end

    def scan_methods(klass = BasicObject)
      klasses = ObjectSpace.each_object(Class).to_a
      klasses |= klasses.map(&:singleton_class)

      klasses.map(&:instance_methods).inject(&:|)
    end
  end
end
<commit_msg>rename method and simplify code<commit_after>module Shiritori
  module SearchMethod
    UNUSE_METHOD = [:exit]

    def get_all_method
      @check_list = {}
      @method_list = get_all_methods

      @method_list - UNUSE_METHOD
    end

    def get_all_methods
      ObjectSpace.each_object(Module).map(&:instance_methods).inject(&:|)
    end
  end
end

{'fraction_non_alphanumeric': 0.08928571428571429, 'fraction_numerical': 0.0, 'mean_word_length': 3.175531914893617, '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': '5977225', 'n_tokens_mistral': 264, 'n_tokens_neox': 255, 'n_words': 49}