<commit_before>module DataForge
  module File
    module RecordFileDefinition

      def self.from_input(name, &initializer_block)
        create name, &initializer_block
      end



      def self.from_existing(definition_to_copy, name, &customization_block)
        create name, definition_to_copy, &customization_block
      end



      private

      def self.create(name, definition_to_copy = nil, &initializer_block)
        CSV::CSVRecordFileDefinition.new(name).tap do |definition|
          definition.copy definition_to_copy if definition_to_copy
          definition.instance_eval &initializer_block if initializer_block
        end
      end



      public

      # Interface definition

      attr_reader :name, :fields



      def copy(definition)
      end

    end
  end
end
<commit_msg>Added :file_name to public interface of record file definition<commit_after>module DataForge
  module File
    module RecordFileDefinition

      def self.from_input(name, &initializer_block)
        create name, &initializer_block
      end



      def self.from_existing(definition_to_copy, name, &customization_block)
        create name, definition_to_copy, &customization_block
      end



      private

      def self.create(name, definition_to_copy = nil, &initializer_block)
        CSV::CSVRecordFileDefinition.new(name).tap do |definition|
          definition.copy definition_to_copy if definition_to_copy
          definition.instance_eval &initializer_block if initializer_block
        end
      end



      public

      # Interface definition

      attr_reader :name, :file_name, :fields



      def copy(definition)
      end

    end
  end
end

{'fraction_non_alphanumeric': 0.05313432835820896, 'fraction_numerical': 0.0, 'mean_word_length': 2.809090909090909, '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': '3216664', 'n_tokens_mistral': 487, 'n_tokens_neox': 448, 'n_words': 115}