Method: Rediska::Driver#write
- Defined in:
- lib/rediska/driver.rb
#write(command) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rediska/driver.rb', line 23 def write(command) meffod = command.shift.to_s.downcase.to_sym if respond_to?(meffod) reply = send(meffod, *command) else raise Redis::CommandError, "ERR unknown command #{meffod.upcase}" end if reply == true reply = 1 elsif reply == false reply = 0 end replies << reply buffer << reply if buffer && meffod != :multi nil end |