Exception: Timeout::ExitException

Inherits:
Exception
  • Object
show all
Defined in:
lib/timeout.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeExitException

Returns a new instance of ExitException.



31
32
33
34
35
# File 'lib/timeout.rb', line 31

def initialize(*)
  super
  @thread = Thread.current
  freeze
end

Instance Attribute Details

#klassObject (readonly)

Returns the value of attribute klass



29
30
31
# File 'lib/timeout.rb', line 29

def klass
  @klass
end

#threadObject (readonly)

Returns the value of attribute thread



29
30
31
# File 'lib/timeout.rb', line 29

def thread
  @thread
end

Instance Method Details

#exceptionObject



37
38
39
40
# File 'lib/timeout.rb', line 37

def exception(*)
  throw(self, caller) if self.thread == Thread.current
  self
end