Class: Shapkeep::Wrapper

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/shapkeep/wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(script_file, redis) ⇒ Wrapper



9
10
11
12
# File 'lib/shapkeep/wrapper.rb', line 9

def initialize(script_file, redis)
  super(redis)
  @shapkeep = Shapkeep.new(script_file)
end

Instance Attribute Details

#shapkeepObject (readonly)

Returns the value of attribute shapkeep.



7
8
9
# File 'lib/shapkeep/wrapper.rb', line 7

def shapkeep
  @shapkeep
end

Instance Method Details

#eval_script(script_name, keys = [], args = []) ⇒ Object



14
15
16
# File 'lib/shapkeep/wrapper.rb', line 14

def eval_script(script_name, keys = [], args = [])
  shapkeep.eval(redis, script_name, keys, args)
end

#redisObject



18
19
20
# File 'lib/shapkeep/wrapper.rb', line 18

def redis
  __getobj__
end