<commit_before>require "forwardable"

module Undo
  class Wrapper < SimpleDelegator
    extend Forwardable
    def_delegators :object, :class, :kind_of?
    attr_reader :uuid

    def initialize(uuid, object, options = {})
      @uuid = uuid
      @object = object
      @mutator_methods = options.delete(:mutator_methods) || []
      @options = options

      super object
    end

    def method_missing(method, *args, &block)
      store if mutator_methods.include? method
      super method, *args, &block
    end

    private
    attr_reader :object, :options

    def mutator_methods
      Kernel.Array(@mutator_methods)
    end<commit_msg>Inline mutator_methods array convertion<commit_after>require "forwardable"

module Undo
  class Wrapper < SimpleDelegator
    extend Forwardable
    def_delegators :object, :class, :kind_of?
    attr_reader :uuid

    def initialize(uuid, object, options = {})
      @uuid = uuid
      @object = object
      @mutator_methods = Kernel.Array(options.delete :mutator_methods)
      @options = options

      super object
    end

    def method_missing(method, *args, &block)
      store if mutator_methods.include? method
      super method, *args, &block
    end

    private
    attr_reader :object, :options, :mutator_methods
{'fraction_non_alphanumeric': 0.08248232521602514, 'fraction_numerical': 0.0, 'mean_word_length': 3.1229773462783172, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7444319', 'n_tokens_mistral': 382, 'n_tokens_neox': 376, 'n_words': 102}