<commit_before>module Pod
  module Generator
    # Generates LLVM module map files. A module map file is generated for each
    # Pod and for each Pod target definition, that is built as framework. It
    # specifies a different umbrella header then usual to avoid name conflicts
    # with existing headers of the podspec.
    #
    class ModuleMap
      # @return [Target] the target represented by this Info.plist.
      #
      attr_reader :target

      # @param  [Target] target @see target
      #
      def initialize(target)
        @target = target
      end

      # Generates and saves the Info.plist to the given path.
      #
      # @param  [Pathname] path
      #         the path where the prefix header should be stored.
      #
      # @return [void]
      #
      def save_as(path)
        FileUtils.mkdir_p(path + '..')
        contents = generate
        path.open('w') do |f|
          f.write(contents)
        end
      end

      # Generates the contents of the module.modulemap file.
      #
      # @return [String]
      #
      def generate
        <<-eos.strip_heredoc
          framework module #{target.product_module_name} {
            umbrella header "#{target.umbrella_header_path.basename}"

            export *
            module * { export * }
          }
        eos
      end
    end
  end
end<commit_msg>Remove unnecessary mkdir in Generator::ModuleMap#save_as<commit_after>module Pod
  module Generator
    # Generates LLVM module map files. A module map file is generated for each
    # Pod and for each Pod target definition, that is built as framework. It
    # specifies a different umbrella header then usual to avoid name conflicts
    # with existing headers of the podspec.
    #
    class ModuleMap
      # @return [Target] the target represented by this Info.plist.
      #
      attr_reader :target

      # @param  [Target] target @see target
      #
      def initialize(target)
        @target = target
      end

      # Generates and saves the Info.plist to the given path.
      #
      # @param  [Pathname] path
      #         the path where the prefix header should be stored.
      #
      # @return [void]
      #
      def save_as(path)
        contents = generate
        path.open('w') do |f|
          f.write(contents)
        end
      end

      # Generates the contents of the module.modulemap file.
      #
      # @return [String]
      #
      def generate
        <<-eos.strip_heredoc
          framework module #{target.product_module_name} {
            umbrella header "#{target.umbrella_header_path.basename}"

            export *
            module * { export * }
          }
        eos
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07074074074074074, 'fraction_numerical': 0.0, 'mean_word_length': 1.8461538461538463, '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': '6422844', 'n_tokens_mistral': 751, 'n_tokens_neox': 729, 'n_words': 260}