<commit_before>require "date"
require "active_support"
require "active_support/core_ext/class/attribute"
require "i18n"
require "i18n_alchemy/date_parser"
require "i18n_alchemy/time_parser"
require "i18n_alchemy/numeric_parser"
require "i18n_alchemy/attribute"
require "i18n_alchemy/association_parser"
require "i18n_alchemy/attributes_parsing"
require "i18n_alchemy/proxy"

module I18n
  module Alchemy
    extend ActiveSupport::Concern

    def localized(attributes=nil, *args)
      I18n::Alchemy::Proxy.new(self, attributes, *args)
    end

    included do
      class_attribute :localized_methods,
        :instance_reader => false, :instance_writer => false
      self.localized_methods = {}
    end

    module ClassMethods
      def localize(*methods, options)
        parser  = options[:using]
        methods = methods.each_with_object(localized_methods) do |method_name, hash|
          hash[method_name] = parser
        end
        self.localized_methods = methods
      end
    end
  end
end<commit_msg>Fix argument splatting on Ruby 1.8<commit_after>require "date"
require "active_support"
require "active_support/core_ext/class/attribute"
require "i18n"
require "i18n_alchemy/date_parser"
require "i18n_alchemy/time_parser"
require "i18n_alchemy/numeric_parser"
require "i18n_alchemy/attribute"
require "i18n_alchemy/association_parser"
require "i18n_alchemy/attributes_parsing"
require "i18n_alchemy/proxy"

module I18n
  module Alchemy
    extend ActiveSupport::Concern

    def localized(attributes=nil, *args)
      I18n::Alchemy::Proxy.new(self, attributes, *args)
    end

    included do
      class_attribute :localized_methods,
        :instance_reader => false, :instance_writer => false
      self.localized_methods = {}
    end

    module ClassMethods
      def localize(*methods)
        options = methods.extract_options!
        parser  = options[:using]
        methods = methods.each_with_object(localized_methods) do |method_name, hash|
          hash[method_name] = parser
        end
        self.localized_methods = methods
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08281474389660125, 'fraction_numerical': 0.020105313547151747, 'mean_word_length': 3.9061032863849765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2598517', 'n_tokens_mistral': 700, 'n_tokens_neox': 651, 'n_words': 137}