Module: RedisClient::Decorator

Defined in:
lib/redis_client/decorator.rb

Defined Under Namespace

Modules: CommandsMixin Classes: Client, Pipeline

Class Method Summary collapse

Class Method Details

.create(commands_mixin) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/redis_client/decorator.rb', line 6

def create(commands_mixin)
  client_decorator = Class.new(Client)
  client_decorator.include(commands_mixin)

  pipeline_decorator = Class.new(Pipeline)
  pipeline_decorator.include(commands_mixin)
  client_decorator.const_set(:Pipeline, pipeline_decorator)

  client_decorator
end