Class: MessageBus::TimerThread::CancelableEvery

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cancelledObject

Returns the value of attribute cancelled.



17
18
19
# File 'lib/message_bus/timer_thread.rb', line 17

def cancelled
  @cancelled
end

#currentObject

Returns the value of attribute current.



17
18
19
# File 'lib/message_bus/timer_thread.rb', line 17

def current
  @current
end

Instance Method Details

#cancelObject



18
19
20
21
# File 'lib/message_bus/timer_thread.rb', line 18

def cancel
  current.cancel if current
  @cancelled = true
end