<commit_before># frozen_string_literal: true

module Windcharger
  module Attributes
    def attributes
      (@__attributes || []).dup.freeze
    end

    private

    def __windcharger_add_attribute name
      (@__attributes ||= []) << name.to_sym
    end

    def attribute *attributes
      if attributes.any?
        attributes.each { |attribute| __windcharger_add_attribute attribute }
      else
        @__windcharger_next_is_attribute = true
      end
    end

    def method_added name
      super
      return unless @__windcharger_next_is_attribute
      __windcharger_add_attribute name
      @__windcharger_next_is_attribute = false
    end
  end
end<commit_msg>Reduce collision probability with ivars<commit_after># frozen_string_literal: true

module Windcharger
  module Attributes
    def attributes
      (@__windcharger_attributes || []).dup.freeze
    end

    private

    def __windcharger_add_attribute name
      (@__windcharger_attributes ||= []) << name.to_sym
    end

    def attribute *attributes
      if attributes.any?
        attributes.each { |attribute| __windcharger_add_attribute attribute }
      else
        @__windcharger_next_is_attribute = true
      end
    end

    def method_added name
      super
      return unless @__windcharger_next_is_attribute
      __windcharger_add_attribute name
      @__windcharger_next_is_attribute = false
    end
  end
end
{'fraction_non_alphanumeric': 0.05420827389443652, 'fraction_numerical': 0.0, 'mean_word_length': 2.9745042492917846, 'pattern_counts': {'":': 0, '<': 7, '<?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': '7222639', 'n_tokens_mistral': 411, 'n_tokens_neox': 402, 'n_words': 97}