<commit_before>require "http_command_behaviour"

module Booty
  class FrontController
    def initialize(command_registry, view_engine)
      @command_registry = command_registry
      @view_engine = view_engine
    end
    def call(env)
      begin
        @command_registry.command_for(env).run(env)
      rescue => e
        html = @view_engine.render(:template => '501.html.erb', :model => e)
        [501, {"Content-Type" => "text/html"}, [html]]
      end
    end
  end
end
<commit_msg>inline variable<commit_after>require "http_command_behaviour"

module Booty
  class FrontController
    def initialize(command_registry, view_engine)
      @command_registry = command_registry
      @view_engine = view_engine
    end
    def call(env)
      begin
        @command_registry.command_for(env).run(env)
      rescue => e
        [501, {"Content-Type" => "text/html"}, [@view_engine.render(:template => '501.html.erb', :model => e)]]
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.11283643892339544, 'fraction_numerical': 0.012422360248447204, 'mean_word_length': 3.1148936170212767, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '807451', 'n_tokens_mistral': 311, 'n_tokens_neox': 301, 'n_words': 65}