<commit_before>module PageScript
  module Helpers
    
    
    def pagescript
      js = <<-JS
        <script type="text/javascript" charset="utf-8">
          (function(params) {
            var function_name = "#{params[:controller]}##{params[:action]}";
            if (typeof this[function_name] == "function") { this[function_name].call(this, params); }
          }).call(window, #{pagescript_params.to_json})
        </script>
      JS
      js.html_safe
    end
    
    
    def pagescript_params(params = {})
      params = params.extract_options!
      
      @pagescript_params ||= {}
      
      params.each do |k, v|
        @pagescript_params[k] = v
      end
      
      @pagescript_params
    end
    
    
    ActiveSupport.on_load :action_controller do
      helper_method :pagescript, :pagescript_params
    end
    <commit_msg>Fixed options<commit_after>module PageScript
  module Helpers
    
    
    def pagescript
      js = <<-JS
        <script type="text/javascript" charset="utf-8">
          (function(params) {
            var function_name = "#{params[:controller]}##{params[:action]}";
            if (typeof this[function_name] == "function") { this[function_name].call(this, params); }
          }).call(window, #{pagescript_params.to_json})
        </script>
      JS
      js.html_safe
    end
    
    
    def pagescript_params(params = {})
      @pagescript_params ||= {}
      
      params.each do |k, v|
        @pagescript_params[k] = v
      end
      
      @pagescript_params
    end
    
    
    ActiveSupport.on_load :action_controller do
      helper_method :pagescript, :pagescript_params
    end
    
{'fraction_non_alphanumeric': 0.11533816425120773, 'fraction_numerical': 0.0012077294685990338, 'mean_word_length': 2.1088180112570356, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5363466', 'n_tokens_mistral': 498, 'n_tokens_neox': 497, 'n_words': 95}