<commit_before>module Lita
  module Adapters
    class Slack < Adapter
      class UserCreator
        def create_user(user_data)
          User.create(user_data["id"], name: real_name(user_data), mention_name: user_data["name"])
        end

        def create_users(users_data)
          users_data.each { |user_data| create_user(user_data) }
        end

        def real_name(user_data)
          real_name = user_data["real_name"]
          real_name.size > 0 ? real_name : user_data["name"]
        end<commit_msg>Get user's real name from "profile" hash.<commit_after>module Lita
  module Adapters
    class Slack < Adapter
      class UserCreator
        def create_user(user_data)
          User.create(user_data["id"], name: real_name(user_data), mention_name: user_data["name"])
        end

        def create_users(users_data)
          users_data.each { |user_data| create_user(user_data) }
        end

        def real_name(user_data)
          real_name = user_data["profile"]["real_name"]
          real_name.size > 0 ? real_name : user_data["name"]
        end
{'fraction_non_alphanumeric': 0.09453197405004633, 'fraction_numerical': 0.0018535681186283596, 'mean_word_length': 2.673469387755102, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3298480', 'n_tokens_mistral': 341, 'n_tokens_neox': 333, 'n_words': 69}