class RingyDingy::CancelableRenewer

This renewer can be canceled to shut down a TupleSpace operation.

Public Class Methods

new(seconds = 1) click to toggle source

Creates a new renewer that will be checked every sec for cancellation by the TupleSpace

# File lib/ringy_dingy/cancelable_renewer.rb, line 11
def initialize seconds = 1
  @renew   = true
  @seconds = seconds
end

Public Instance Methods

cancel() click to toggle source

Cancels the renewer

# File lib/ringy_dingy/cancelable_renewer.rb, line 19
def cancel
  @renew = false
end