<commit_before>module Specroutes::Routing
  module Interface
    class MetaDataDSL
      attr_accessor :route_specification, :match_block

      def initialize(route_specification, &block)
        self.route_specification = route_specification
        instance_eval(&block) if block
      end

      def accept(mime_type, constraint: false)
        accepts << mime_type
        mime_constraints << mime_type if constraint
      end

      def doc(lang: 'en', title:, body: '')
        docs[lang] = {lang: lang, title: title, body: body}
      end

      def match_block(&block)
        self.match_block = block
      end

      def accepts
        @accepts ||= []
      end

      def mime_constraints
        @mime_constraints ||= []
      end<commit_msg>ensure that accepts list contains unique items.<commit_after>module Specroutes::Routing
  module Interface
    class MetaDataDSL
      attr_accessor :route_specification, :match_block

      def initialize(route_specification, &block)
        self.route_specification = route_specification
        instance_eval(&block) if block
      end

      def accept(mime_type, constraint: false)
        accepts << mime_type
        mime_constraints << mime_type if constraint
      end

      def doc(lang: 'en', title:, body: '')
        docs[lang] = {lang: lang, title: title, body: body}
      end

      def match_block(&block)
        self.match_block = block
      end

      def accepts
        @accepts ||= Set.new
      end

      def mime_constraints
        @mime_constraints ||= []
      end
{'fraction_non_alphanumeric': 0.08123791102514506, 'fraction_numerical': 0.0, 'mean_word_length': 2.4565701559020043, 'pattern_counts': {'":': 0, '<': 11, '<?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': '2644857', 'n_tokens_mistral': 455, 'n_tokens_neox': 438, 'n_words': 116}