Method: Redis::Commands::Keys#copy
- Defined in:
- lib/redis/commands/keys.rb
#copy(source, destination, db: nil, replace: false) ⇒ Boolean
Copy a value from one key to another.
349 350 351 352 353 354 355 |
# File 'lib/redis/commands/keys.rb', line 349 def copy(source, destination, db: nil, replace: false) command = [:copy, source, destination] command << "DB" << db if db command << "REPLACE" if replace send_command(command, &Boolify) end |