<commit_before>module Asp
  module Element
    def self.included(target)
      Asp::Memory.instance.remember(target)
      target.include(InstanceMethods)
      target.extend(ClassMethods)
    end

    module InstanceMethods
      def initialize(opts={})
        @init_string = opts[:init_string]
      end

      def init_string
        @init_string
      end
    end

    module ClassMethods
      def match?(string)
        true
      end

      def from(string)
        self.new(:init_string => string)
      end

      def asp
        underscores = self.asp_attributes.collect { "_" }
        attribute_names_with_underscores = self.asp_attributes.zip(underscores).flatten
        defaults = Hash[*attribute_names_with_underscores]
        "#{self.to_s.downcase}(#{defaults.values.join","})"
      end

      def asp_attributes
        []
      end
    end
  end<commit_msg>green: spec for overriding default asp_attributes<commit_after>module Asp
  module Element
    def self.included(target)
      Asp::Memory.instance.remember(target)
      target.include(InstanceMethods)
      target.extend(ClassMethods)
    end

    module InstanceMethods
      def initialize(opts={})
        @init_string = opts[:init_string]
      end

      def init_string
        @init_string
      end
    end

    module ClassMethods
      def match?(string)
        true
      end

      def from(string)
        self.new(:init_string => string)
      end

      def asp(opts={})
        underscores = self.asp_attributes.collect { "_" }
        attribute_names_with_underscores = self.asp_attributes.zip(underscores).flatten
        defaults = Hash[*attribute_names_with_underscores]
        opts = defaults.merge(opts)
        "#{self.to_s.downcase}(#{opts.values.join","})"
      end

      def asp_attributes
        []
      end
    end
  end
{'fraction_non_alphanumeric': 0.088283378746594, 'fraction_numerical': 0.0, 'mean_word_length': 2.3260869565217392, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3348366', 'n_tokens_mistral': 551, 'n_tokens_neox': 520, 'n_words': 102}