class RediSearcher::Client::CommandBase

Constants

OPTIONS_FLAGS
OPTIONS_PARAMS

Private Instance Methods

flags_for_method(method, **options) click to toggle source
# File lib/redi_searcher/client/command_base.rb, line 13
def flags_for_method(method, **options)
  self.class::OPTIONS_FLAGS[method].to_a.map do |key|
    key.to_s.upcase if options[key]
  end.compact
end
params_for_method(method, **options) click to toggle source
# File lib/redi_searcher/client/command_base.rb, line 19
def params_for_method(method, **options)
  self.class::OPTIONS_PARAMS[method].to_a.map do |key|
    [key.to_s.upcase, *options[key]] unless options[key].nil?
  end.compact
end
serialize_options(method, **options) click to toggle source
# File lib/redi_searcher/client/command_base.rb, line 9
def serialize_options(method, **options)
  [flags_for_method(method, options), params_for_method(method, options)].flatten.compact
end