<commit_before>  require "erubis"
  require "rulers2/file_model"

  module Rulers2
    class Controller
      include Rulers2::Model
      def initialize(env)
        @env = env
      end

      def env
        @env
      end

      def render(view_name, locals = {})
        filename = File.join "app", "views", controller_name, "#{view_name}.html.erb"
        template = File.read filename
        eruby = Erubis::Eruby.new(template)
        eruby.result locals.merge(my_instance_variables)
      end

      def my_instance_variables(vars = {})<commit_msg>create request and params method for Controller<commit_after>  require "erubis"
  require "rulers2/file_model"
  require "rack/request"

  module Rulers2
    class Controller
      include Rulers2::Model
      def initialize(env)
        @env = env
      end

      def env
        @env
      end

      def request
        @request ||= Rack::Request.new(@env)
      end

      def params
        request.params
      end

      def render(view_name, locals = {})
        filename = File.join "app", "views", controller_name, "#{view_name}.html.erb"
        template = File.read filename
        eruby = Erubis::Eruby.new(template)
        eruby.result locals.merge(my_instance_variables)
      end

      def my_instance_variables(vars = {})
{'fraction_non_alphanumeric': 0.09384615384615384, 'fraction_numerical': 0.004615384615384616, 'mean_word_length': 2.318877551020408, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5077489', 'n_tokens_mistral': 406, 'n_tokens_neox': 396, 'n_words': 95}