Method: Redis#initialize

Defined in:
lib/cryo/database/redis.rb

#initialize(opts = {}) ⇒ Redis

Returns a new instance of Redis.



5
6
7
8
9
10
11
12
13
# File 'lib/cryo/database/redis.rb', line 5

def initialize(opts={})
  raise "you need to specify a remote host" unless opts[:host]
  self.host = opts[:host]
  self.user = opts[:user] || 'ubuntu'
  raise "you need to specify a tmp path" unless opts[:tmp_path]
  self.tmp_path = opts[:tmp_path]
  self.remote_path = opts[:path] || '/mnt/redis/dump.rdb'
  self.local_path = opts[:local_path] || get_tempfile
end