<commit_before>module CoderWally
  # Builds the CoderWall object from the response
  class Builder
    # Instantiate class
    def initialize
    end

    # parse badges from data
    def parse_badges(data)
      data['badges'].map { |badge| Badge.new(badge) } if data['badges']
    end

    # parse account information from data
    def parse_accounts(data)
      Account.new(data['accounts']) if data['accounts']
    end

    # parse user information from data
    def parse_user(data)
      User.new(data['name'], data['username'],
               data['location'], data['team'], data['endorsements'])
    end

    # build CoderWall object from API response
    def build(response)
      badges = parse_badges(response)
      accounts = parse_accounts(response)
      user = parse_user(response)

      CoderWall.new badges, user, accounts
    end
  end
end<commit_msg>Started fixing fetaure envy code smell for accounts<commit_after>module CoderWally
  # Builds the CoderWall object from the response
  class Builder
    # Instantiate class
    def initialize
    end

    # parse badges from data
    def parse_badges(badges)
      badges.map { |badge| Badge.new(badge) } if badges
    end

    # parse account information from data
    def parse_accounts(accounts)
      Account.new(accounts) if accounts
    end

    # parse user information from data
    def parse_user(data)
      User.new(data['name'], data['username'],
               data['location'], data['team'], data['endorsements'])
    end

    # build CoderWall object from API response
    def build(response)
      badges = parse_badges(response['badges'])
      accounts = parse_accounts(response['accounts'])
      user = parse_user(response)

      CoderWall.new badges, user, accounts
    end
  end
end
{'fraction_non_alphanumeric': 0.08896396396396396, 'fraction_numerical': 0.0, 'mean_word_length': 3.0386363636363636, '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': '2943158', 'n_tokens_mistral': 525, 'n_tokens_neox': 513, 'n_words': 152}