<commit_before>module Syncro
  module RPC
    def klasses
      @klasses ||= []
    end
    module_function :klasses
    
    def invoke(app, message)
      unless klasses.include?(message[:klass])
        app.error(404)
      end
      
      klass = message[:klass].constantize
      
      unless klass.respond_to?(message[:method])
        app.error(405)
      end
      
      result = klass.send(message[:method], *message[:args])
      app.respond(result)
    end
    module_function :invoke
        
    module Expose
      def self.included(base)
        RPC.klasses << base.name
      end      
    end
  end
end<commit_msg>actually return when auth fails<commit_after>module Syncro
  module RPC
    def klasses
      @klasses ||= []
    end
    module_function :klasses
    
    def invoke(app, message)
      unless klasses.include?(message[:klass])
        app.error(404)
        return
      end
      
      klass = message[:klass].constantize
      
      unless klass.respond_to?(message[:method])
        app.error(405)
        return
      end
      
      result = klass.send(message[:method], *message[:args])
      app.respond(result)
    end
    module_function :invoke
        
    module Expose
      def self.included(base)
        RPC.klasses << base.name
      end      
    end
  end
end
{'fraction_non_alphanumeric': 0.09270516717325228, 'fraction_numerical': 0.00911854103343465, 'mean_word_length': 1.9072847682119205, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1729483', 'n_tokens_mistral': 400, 'n_tokens_neox': 400, 'n_words': 85}