Method: Redis::Commands::Scripting#script
- Defined in:
- lib/redis/commands/scripting.rb
#script(subcommand, *args) ⇒ String, ...
Control remote script registry.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/redis/commands/scripting.rb', line 30 def script(subcommand, *args) subcommand = subcommand.to_s.downcase if subcommand == "exists" arg = args.first send_command([:script, :exists, arg]) do |reply| reply = reply.map { |r| Boolify.call(r) } if arg.is_a?(Array) reply else reply.first end end else send_command([:script, subcommand] + args) end end |