Sha256: a20b3606d01cdb8d6eee4aa426f8e042ac9cbfdc0b5492ecc571c7357786f2dc
Contents?: true
Size: 451 Bytes
Versions: 8
Compression:
Stored size: 451 Bytes
Contents
require 'eventmachine' class RestCore::Timeout::TimerEm < ::EventMachine::Timer attr_accessor :timeout, :error def initialize timeout, error, &block super(timeout, &block) if block_given? self.timeout = timeout self.error = error @canceled = false end def on_timeout &block send(:initialize, timeout, error, &block) end def cancel super @canceled = true end def canceled? @canceled end end
Version data entries
8 entries across 8 versions & 1 rubygems