Class: Redify::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/redify/application.rb

Class Method Summary collapse

Class Method Details

.installObject



9
10
11
12
13
14
# File 'lib/redify/application.rb', line 9

def install
  return false unless installable?
  p, n, h = get_data
  h.sadd("#{p}", n)
  h.sadd("#{p}:#{n}:PIDs", $$)
end

.uninstallObject



16
17
18
19
20
21
# File 'lib/redify/application.rb', line 16

def uninstall
  p, n, h = get_data
  h.srem("#{p}", n)
  h.srem("#{p}:#{n}:PIDs", $$)
  true
end