<commit_before>class RedisDashboard::Client
  attr_reader :url, :connection

  def initialize(url)
    @url = url
  end

  def clients
    connection.client.call([:client, "list"]).split("\n").map do |line|
      line.split(" ").reduce({}) do |hash, str|
        pair = str.split("=")
        hash[pair[0]] = pair[1]
        hash
      end
    end
  end

  def config
    hash = {}
    array = connection.config("get", "*")
    while (pair = array.slice!(0, 2)).any?
      hash[pair.first] = pair.last
    end
    hash<commit_msg>Simplify RedisDashboard::Client#client<commit_after>class RedisDashboard::Client
  attr_reader :url, :connection

  def initialize(url)
    @url = url
  end

  def clients
    connection.client("list")
  end

  def config
    hash = {}
    array = connection.config("get", "*")
    while (pair = array.slice!(0, 2)).any?
      hash[pair.first] = pair.last
    end
    hash
{'fraction_non_alphanumeric': 0.14855875831485588, 'fraction_numerical': 0.0066518847006651885, 'mean_word_length': 2.731404958677686, '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': '2335954', 'n_tokens_mistral': 306, 'n_tokens_neox': 298, 'n_words': 69}