<commit_before>module Padrino
  module Responders
    module Helpers
      module ControllerHelpers
        protected
          ##
          # Shortcut for <code>notifier.say</code> method.
          #
          def notify(kind, message, *args, &block)
            self.class.notifier.say(self, kind, message, *args, &block)
          end
          
          ##
          # Returns name of current action
          #
          def action_name
            name = request.match.route.instance_variable_get('@name').to_s
            name.gsub!(/^#{controller_name}_?/, '')
            name = 'index' if name == ''
            name
          end
          module Padrino
  module Responders
    module Helpers
      module ControllerHelpers
        protected
          ##
          # Shortcut for <code>notifier.say</code> method.
          #
          def notify(kind, message, *args, &block)
            self.class.notifier.say(self, kind, message, *args, &block)
          end
          
          ##
          # Returns name of current action
          #
          def action_name
            name = request.match.route.instance_variable_get('@name').to_s
            name.gsub!(/^#{controller_name}_?/, '')
            name = 'index' if name == ''
            name
          end
          
          ##
          # Returns name of current controller
          #
          def controller_name
            request.match.route.controller.to_s
          end
          
          ##
          # Returns translated, human readable name for specified model. 
          #
          def human_model_name(object)
            if object.class.respond_to?(:human_name)
              object.class.human_name 
            else
              t("models.#{object.class.to_s.underscore}", :default => object.class.to_s.humanize)
            end 
          end
      end # ControllerHelpers
    end # Helpers
  end # Responders
end # Padrino
          ##
          # Returns name of current controller
          #
          def controller_name
            request.match.route.controller.to_s
          end
          
          ##
          # Returns translated, human readable name for specified model. 
          #
          def human_model_name(object)
            if object.class.respond_to?(:human_name)
              object.class.human_name 
            else
              t("models.#{object.class.to_s.underscore}", :default => object.class.to_s.humanize)
            end 
          end
      end # ControllerHelpers
    end # Helpers
  end # Responders
end # Padrino<commit_msg>Fixed some shit in heleprs<commit_after>module Padrino
  module Responders
    module Helpers
      module ControllerHelpers
        protected
          ##
          # Shortcut for <code>notifier.say</code> method.
          #
          def notify(kind, message, *args, &block)
            self.class.notifier.say(self, kind, message, *args, &block)
          end
          
          ##
          # Returns name of current action
          #
          def action_name
            name = request.match.route.instance_variable_get('@name').to_s
            name.gsub!(/^#{controller_name}_?/, '')
            name = 'index' if name == ''
            name
          end
          
          ##
          # Returns name of current controller
          #
          def controller_name
            request.match.route.controller.to_s
          end
          
          ##
          # Returns translated, human readable name for specified model. 
          #
          def human_model_name(object)
            if object.class.respond_to?(:human_name)
              object.class.human_name 
            else
              t("models.#{object.class.to_s.underscore}", :default => object.class.to_s.humanize)
            end 
          end
      end # ControllerHelpers
    end # Helpers
  end # Responders
end # Padrino
{'fraction_non_alphanumeric': 0.086664947124065, 'fraction_numerical': 0.0, 'mean_word_length': 1.4313479623824452, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 12, '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': 1, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '930692', 'n_tokens_mistral': 1020, 'n_tokens_neox': 1010, 'n_words': 231}