Sha256: bf844e8b64d27084ce3bafe7bdb7d574549227ccea675f6fdf1f021f40f2094e
Contents?: true
Size: 383 Bytes
Versions: 8
Compression:
Stored size: 383 Bytes
Contents
module ShortLived def self.included klass klass.extend ClassMethods end def initialize window super window threaded self.lifetime do self.destroy! end end module ClassMethods def lifetime lifetime = nil, &block block = lambda { lifetime } unless block_given? define_method :lifetime, &block end end end
Version data entries
8 entries across 8 versions & 1 rubygems