<commit_before>module Rafters::Component
  extend ActiveSupport::Concern

  attr_writer :controller

  def initialize(settings = {})
    @settings = settings
  end

  def template_name
    return @_template_name if @_template_name

    _template_name = self.class._template_name
    _underscored_name = self.class.name.underscore
    
    if _template_name.is_a?(Proc)
      _template_name = _template_name.call(self)
    end

    @_template_name = (_template_name || _underscored_name)
  end

  def attributes
    return {} if self.class._attributes.nil?

    @_attributes ||= Hashie::Mash.new.tap do |_attributes|<commit_msg>Clean up the template_name method<commit_after>module Rafters::Component
  extend ActiveSupport::Concern

  attr_writer :controller

  def initialize(settings = {})
    @settings = settings
  end

  def template_name
    @template_name ||= begin
      _template_name = (self.class._template_name || self.class.name.underscore)
      
      if _template_name.is_a?(Proc)
        _template_name = _template_name.call(self)
      end

      _template_name
    end
  end

  def attributes
    return {} if self.class._attributes.nil?

    @_attributes ||= Hashie::Mash.new.tap do |_attributes|
{'fraction_non_alphanumeric': 0.08799342105263158, 'fraction_numerical': 0.0, 'mean_word_length': 3.5580524344569286, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1040166', 'n_tokens_mistral': 392, 'n_tokens_neox': 373, 'n_words': 77}