Sha256: 0225ca2257df616edb0be15dae5364d8751d5cee0c3540c383bc79e8880cd53b
Contents?: true
Size: 412 Bytes
Versions: 6
Compression:
Stored size: 412 Bytes
Contents
-- Let's us cancel a callback wax.callback = function(callback) local object = {callback = callback} function object.cancel(self) self.canceled = true end function object.__call(self, ...) if self.canceled then return end local args = self.scope and {self.scope, ...} or {...} self.callback(unpack(args)) end setmetatable(object, object) return object end
Version data entries
6 entries across 6 versions & 1 rubygems