<commit_before>module Swaggard
  module Swagger
    class Tag

      attr_accessor :name, :description

      attr_reader :controller_class

      def initialize(yard_object)
        @yard_name = yard_object.name

        controller_name = "#{yard_object.namespace}::#{yard_object.name}"
        controller_name.prepend("#{Swaggard.configuration.module_name}::") if !Swaggard.configuration.module_name.blank?

        @controller_class = controller_name.constantize

        tag = yard_object.tags.find { |tag| tag.tag_name == 'tag' }

        @name =  tag ? tag.text : "#{@controller_class.controller_path}"
        @description = yard_object.docstring || ''
      end

      def to_doc
        {<commit_msg>changing if ! to be unless<commit_after>module Swaggard
  module Swagger
    class Tag

      attr_accessor :name, :description

      attr_reader :controller_class

      def initialize(yard_object)
        @yard_name = yard_object.name

        controller_name = "#{yard_object.namespace}::#{yard_object.name}"
        controller_name.prepend("#{Swaggard.configuration.module_name}::") unless Swaggard.configuration.module_name.blank?

        @controller_class = controller_name.constantize

        tag = yard_object.tags.find { |tag| tag.tag_name == 'tag' }

        @name =  tag ? tag.text : "#{@controller_class.controller_path}"
        @description = yard_object.docstring || ''
      end

      def to_doc
        {
{'fraction_non_alphanumeric': 0.10739191073919108, 'fraction_numerical': 0.0, 'mean_word_length': 3.053672316384181, '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': '4483065', 'n_tokens_mistral': 433, 'n_tokens_neox': 418, 'n_words': 76}