module MockRedis::InfoMethod

Constants

ALL_INFO
CLIENTS_INFO
COMMAND_STATS_COMBINED_INFO
COMMAND_STATS_SOLO_INFO

The Ruby Redis client returns commandstats differently when it’s called as “INFO commandstats”. rubocop:disable Layout/LineLength

CPU_INFO
DEFAULT_INFO

rubocop:enable Layout/LineLength

KEYSPACE_INFO
MEMORY_INFO
PERSISTENCE_INFO
REPLICATION_INFO
SERVER_INFO
STATS_INFO

Public Instance Methods

info(section = :default) click to toggle source
# File lib/mock_redis/info_method.rb, line 144
def info(section = :default)
  case section
  when :default;      DEFAULT_INFO
  when :all;          ALL_INFO
  when :server;       SERVER_INFO
  when :clients;      CLIENTS_INFO
  when :memory;       MEMORY_INFO
  when :persistence;  PERSISTENCE_INFO
  when :stats;        STATS_INFO
  when :replication;  REPLICATION_INFO
  when :cpu;          CPU_INFO
  when :keyspace;     KEYSPACE_INFO
  when :commandstats; COMMAND_STATS_SOLO_INFO
  end
end