Class: MessageBus::TimerThread::Cancelable

Inherits:
Object
  • Object
show all
Defined in:
lib/message_bus/timer_thread.rb

Constant Summary collapse

NOOP =
proc {}

Instance Method Summary collapse

Constructor Details

#initialize(job) ⇒ Cancelable

Returns a new instance of Cancelable.



9
10
11
# File 'lib/message_bus/timer_thread.rb', line 9

def initialize(job)
  @job = job
end

Instance Method Details

#cancelObject



12
13
14
# File 'lib/message_bus/timer_thread.rb', line 12

def cancel
  @job[1] = NOOP
end