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.



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

def initialize(job)
  @job = job
end

Instance Method Details

#cancelObject



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

def cancel
  @job[1] = NOOP
end