<commit_before>module SugarCRM
  # A class for handling SugarCRM Modules
  class Module
    attr :name, true
    attr :table_name, true
    attr :custom_table_name, true
    attr :klass, true
    attr :fields, true
    attr :link_fields, true

    # Dynamically register objects based on Module name
    # I.e. a SugarCRM Module named Users will generate
    # a SugarCRM::User class.
    def initialize(name)
      @name   = name
      @klass  = name.classify
      @table_name = name.tableize
      @custom_table_name = @table_name + "_cstm"
      @fields = {}<commit_msg>fix custom_table_name to return correct table name for custom module (created in Studio)<commit_after>module SugarCRM
  # A class for handling SugarCRM Modules
  class Module
    attr :name, true
    attr :table_name, true
    attr :custom_table_name, true
    attr :klass, true
    attr :fields, true
    attr :link_fields, true

    # Dynamically register objects based on Module name
    # I.e. a SugarCRM Module named Users will generate
    # a SugarCRM::User class.
    def initialize(name)
      @name   = name
      @klass  = name.classify
      @table_name = name.tableize
      
      # set table name for custom attibutes
      # custom attributes are contained in a table named after the module, with a '_cstm' suffix
      # the module's table name must be tableized for the modules that ship with SugarCRM
      # for custom modules (created in the Studio), table name don't need to be tableized: the name passed to the constructor is already tableized
      unless name.downcase == name # this module is a custom module (custom module names are all lower_case, whereas SugarCRM modules are CamelCase
        @custom_table_name = @table_name + "_cstm"
      else
        @custom_table_name = name + "_cstm"
      end
      
      @fields = {}
{'fraction_non_alphanumeric': 0.06229508196721312, 'fraction_numerical': 0.0, 'mean_word_length': 2.8710359408033828, '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': '7354088', 'n_tokens_mistral': 525, 'n_tokens_neox': 521, 'n_words': 211}