class DbSucker::Application::FakeChannel

Public Class Methods

new(&block) click to toggle source
# File lib/db_sucker/application/fake_channel.rb, line 4
def initialize &block
  @storage = {}
  @termination = block
end

Public Instance Methods

[](k) click to toggle source
# File lib/db_sucker/application/fake_channel.rb, line 9
def [] k
  @storage[k]
end
[]=(k, v) click to toggle source
# File lib/db_sucker/application/fake_channel.rb, line 13
def []= k, v
  @storage[k] = v
end
alive?() click to toggle source
# File lib/db_sucker/application/fake_channel.rb, line 17
def alive?
  !@termination.try(:call, self)
end