lib/redis_ssdb_proxy/client.rb
def method_missing(name, *args, &block)
      if master.respond_to?(name)
        self.class.send(:send_to_both, name)
        slave.send(name, *args, &block)
        master.send(name, *args, &block)
      else
        super
      end
    end
# all write opreate send to master slave both
all write opreate send to master slave both
all write opreate send to master slave both
def method_missing(name, *args, &block)
      if master.respond_to?(name)
        self.class.send(:send_to_both, name)
        slave.send(name, *args, &block)
        master.send(name, *args, &block)
      else
        super
      end
    end
def method_missing ( name , * args , & block ) if master . respond_to? ( name ) self . class . send ( :send_to_both , name ) slave . send ( name , * args , & block ) master . send ( name , * args , & block ) else super end end
all write opreate send to master slave both
all write opreate send to master slave both
name
args
block