<commit_before># Detects the table class the output should use and delegates rendering to it.
class Hirb::Helpers::AutoTable
  # Same options as Hirb::Helpers::Table.render.
  def self.render(output, options={})
    output = output.to_a if !output.is_a?(Array) && output.respond_to?(:to_a)
    klass = if ((output.is_a?(Array) && output[0].is_a?(ActiveRecord::Base)) or output.is_a?(ActiveRecord::Base) rescue false)
      Hirb::Helpers::ActiveRecordTable
    elsif (output.is_a?(Array) && !(output[0].is_a?(Hash) || output[0].is_a?(Array)))
      Hirb::Helpers::ObjectTable
    else
      Hirb::Helpers::Table
    end<commit_msg>changed deprecated to_a to Array<commit_after># Detects the table class the output should use and delegates rendering to it.
class Hirb::Helpers::AutoTable
  # Same options as Hirb::Helpers::Table.render.
  def self.render(output, options={})
    output = Array(output)
    klass = if (output[0].is_a?(ActiveRecord::Base) rescue false)
      Hirb::Helpers::ActiveRecordTable
    elsif !(output[0].is_a?(Hash) || output[0].is_a?(Array))
      Hirb::Helpers::ObjectTable
    else
      Hirb::Helpers::Table
    end
{'fraction_non_alphanumeric': 0.14448336252189142, 'fraction_numerical': 0.005253940455341506, 'mean_word_length': 4.686567164179104, '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': '7125048', 'n_tokens_mistral': 362, 'n_tokens_neox': 388, 'n_words': 86}