<commit_before># stdlib
require "forwardable"


module Jekyll
  module AssetsPlugin
    class AssetFile

      extend Forwardable


      @@mtimes = Hash.new


      attr_reader :asset


      def_delegator :@site, :assets_config, :config
      def_delegator :@asset, :content_type


      def initialize site, asset
        @site, @asset = site, asset
      end


      def destination dest
        File.join dest, config.dirname, filename
      end


      def filename
        case config.cachebust
        when :none, :soft then asset.logical_path
        when :hard        then asset.digest_path
        else raise "Unknown cachebust strategy: #{config.cachebust.inspect}"
        end
      end


      def path
        @asset.pathname.to_s
      end


      def mtime
        @asset.mtime.to_i
      end


      def modified?
        @@mtimes[path] != mtime
      end


      def write dest
        dest_path = destination dest

        return false if File.exist?(dest_path) and !modified?
        @@mtimes[path] = mtime

        @asset.write_to dest_path
        @asset.write_to "#{dest_path}.gz" if gzip?

        true
      end


      def == other
        case other
        when AssetFile        then @asset == other.asset
        when Sprockets::Asset then @asset == other
        else false
        end
      end


      def gzip?
        config.gzip.include? content_type
      end


      def to_s
        "#<Jekyll::AssetsPlugin::AssetFile:#{asset.logical_path}>"
      end

    end
  end
end<commit_msg>Drop Forwardable from AssetFile<commit_after>module Jekyll
  module AssetsPlugin
    class AssetFile

      @@mtimes = Hash.new


      attr_reader :asset


      def initialize site, asset
        @site, @asset = site, asset
      end


      def content_type
        asset.content_type
      end


      def destination dest
        File.join dest, @site.assets_config.dirname, filename
      end


      def filename
        case cachebust = @site.assets_config.cachebust
        when :none, :soft then asset.logical_path
        when :hard        then asset.digest_path
        else raise "Unknown cachebust strategy: #{cachebust.inspect}"
        end
      end


      def path
        asset.pathname.to_s
      end


      def mtime
        asset.mtime.to_i
      end


      def modified?
        @@mtimes[path] != mtime
      end


      def write dest
        dest_path = destination dest

        return false if File.exist?(dest_path) and !modified?
        @@mtimes[path] = mtime

        asset.write_to dest_path
        asset.write_to "#{dest_path}.gz" if gzip?

        true
      end


      def == other
        case other
        when AssetFile        then asset == other.asset
        when Sprockets::Asset then asset == other
        else false
        end
      end


      def gzip?
        @site.assets_config.gzip.include? content_type
      end


      def to_s
        "#<Jekyll::AssetsPlugin::AssetFile:#{asset.logical_path}>"
      end

    end
  end
end
{'fraction_non_alphanumeric': 0.06993006993006994, 'fraction_numerical': 0.0, 'mean_word_length': 1.7559633027522936, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5921943', 'n_tokens_mistral': 932, 'n_tokens_neox': 861, 'n_words': 246}