Exception: Timeout::ExitException
- Inherits:
-
Exception
- Object
- Exception
- Timeout::ExitException
- Defined in:
- lib/timeout.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#thread ⇒ Object
readonly
Returns the value of attribute thread.
Instance Method Summary collapse
- #exception ⇒ Object
-
#initialize ⇒ ExitException
constructor
A new instance of ExitException.
Constructor Details
#initialize ⇒ ExitException
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
#klass ⇒ Object (readonly)
Returns the value of attribute klass
29 30 31 |
# File 'lib/timeout.rb', line 29 def klass @klass end |
#thread ⇒ Object (readonly)
Returns the value of attribute thread
29 30 31 |
# File 'lib/timeout.rb', line 29 def thread @thread end |
Instance Method Details
#exception ⇒ Object
37 38 39 40 |
# File 'lib/timeout.rb', line 37 def exception(*) throw(self, caller) if self.thread == Thread.current self end |