<commit_before>module Inum
  # DefinedCheckMethod module should be extend.
  #
  # @example
  #   class Fruit
  #     extend Inum::DefineCheckMethod
  #     define_check_method :type, FruitType
  #   
  #     attr_accessor :type
  #   end
  #
  module DefineCheckMethod
    # Define compare method in class.
    #
    # @param variable_name [String]     name of variable.
    # @param enum_class    [Inum::Base] class of extended Enum::EnumBase.
    def define_check_method(variable_name, enum_class)
      self.class_eval do
        enum_class::DEFINED_ENUMS.each_key do |enum_name|
          define_method("#{enum_name.downcase}?") do
            enum_class::parse(enum_name).eql?(send(variable_name))<commit_msg>change define check method generate under_score_method_name.<commit_after>module Inum
  # DefinedCheckMethod module should be extend.
  #
  # @example
  #   class Fruit
  #     extend Inum::DefineCheckMethod
  #     define_check_method :type, FruitType
  #   
  #     attr_accessor :type
  #   end
  #
  module DefineCheckMethod
    require 'inum/utils'
    
    # Define compare method in class.
    #
    # @param variable_name [String]     name of variable.
    # @param enum_class    [Inum::Base] class of extended Enum::EnumBase.
    def define_check_method(variable_name, enum_class)
      self.class_eval do
        enum_class::DEFINED_ENUMS.each_key do |enum_name|
          define_method("#{Inum::Utils::underscore(enum_name)}?") do
            enum_class::parse(enum_name).eql?(send(variable_name))
{'fraction_non_alphanumeric': 0.0912672357189757, 'fraction_numerical': 0.0, 'mean_word_length': 3.1639344262295084, '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': '5372459', 'n_tokens_mistral': 489, 'n_tokens_neox': 481, 'n_words': 104}